Purpose: To develop a planning algorithm for dynamic particle therapy. Materials and Methods: In our modeling, a beam of heavy charged particles is viewed as a high dose volume (called a “shot”) localized in its Bragg Peak region, and treatment planning is to route this shot to cover a target volume. Compared to pencil beam scanning, where the target is scanned layer by layer, we intend to optimize the route of the Bragg Peak along with the energy and orientation of the beams on a global scale. The key steps of our optimization include: (1) Use geometric and randomized techniques to select a collection of potential “shots” based on pre‐computed kernels of different energies. (2) Filter out the final shots using constrained least square optimization. (3) Calculate a “traveling salesman” route of the final shots. (4) Interpolate the route and perform an accurate dose calculation for each interpolation point. (5) Calculate the dwelling time of each interpolation point using constrained least square optimization. Results: A planning system is implemented and is applied to proton and antiproton therapies for 3 simulated 3D phantoms. The first phantom has a spherical target. The second phantom consists of a spherical target surrounded by a C‐shaped critical structure. The third phantom is obtained by swapping the target and critical structure in the second phantom. In all cases, 2 pairs of opposing beams were used in the optimization. In all cases, the planning algorithm generates high quality plans. We have also observed that proton and antiproton are comparable in their abilities to produce quality plans in terms of physical dose. Conclusion: A planning algorithm for dynamic particle therapy is developed and has been verified using protons and antiprotons. For future research, we will extend the technique to other heavy charged particles and incorporate radiobiological effects.