We propose a new mechanism for generating a CP phase via a Higgs vacuum expectation value originating from geometry of an extra dimension. A twisted boundary condition is the key to produce an extra-dimension coordinate-dependent vacuum expectation value, which contains a CP phase degree of freedom and can be a new source of a CP phase in higher-dimensional gauge theories. As an illustrative example, we apply our mechanism to a five-dimensional gauge theory with point interactions and show that our mechanism can dynamically produce a nontrivial CP-violating phase with electroweak symmetry breaking, even though the five-dimensional model does not include any CP-violating phases of Yukawa couplings in the five-dimensional Lagrangian because of a single generation of five-dimensional fermions. We apply our mechanism to a model with point interactions, which has no source of CP-violating phases in the couplings of the higher-dimensional action, and show that a nontrivial CP phase dynamically appears. © 2013 American Physical Society.