Portfolio optimization is an important problem in mathematical finance, and a promising target for quantum optimization algorithms. The use cases solved daily in financial institutions are subject to many constraints that arise from business objectives and regulatory requirements, which make these problems challenging to solve on quantum computers. We introduce a technique that uses quantum Zeno dynamics to solve optimization problems with multiple arbitrary constraints, including inequalities. We show that the dynamics of the quantum optimization can be efficiently restricted to the in-constraint subspace via repeated projective measurements, requiring only a small number of auxiliary qubits and no post-selection. Our technique has broad applicability, which we demonstrate by incorporating it into the quantum approximate optimization algorithm (QAOA) and variational quantum circuits for optimization. We analytically show that achieving a constant minimum success probability in QAOA requires a number of measurements that is independent of the problem size for a specific choice of mixer operator. We evaluate our method numerically on the problem of portfolio optimization with multiple realistic constraints, and observe better solution quality and higher in-constraint probability than the state-of-the-art technique of enforcing constraints by introducing a penalty into the objective. We demonstrate the proposed method on the Quantinuum H1-2 trapped-ion quantum processor, observing performance improvements from circuits with two-qubit gate depths of up to 148.