We have developed a new method for beam orientation optimization in intensity-modulated radiation therapy (IMRT). The problem of beam orientation optimization in IMRT is solved by a decoupled two-step iterative process: (1) optimization of the intensity profiles for given beam configurations; (2) selection of optimal beam configurations based on the ranking by an objective function score for the results of the intensity profile optimization. The simulated dynamics algorithm is used for the intensity profile optimization. This algorithm enforces both the hard constraints and dose-volume constraints. A genetic algorithm is used to select beam orientation configurations. The method has been tested for both a simulated and clinical case, and the results show that beam orientation optimization significantly improved IMRT plans within a time period that is clinically acceptable. The results also show the dependence of the optimal orientation configurations on the prescribed constraints. In addition, beam orientation optimization by the method described here can provide multiple plans with similar dose distributions. This degeneracy characteristic can be exploited to our advantage in introducing additional planning objectives, e.g., the smoothness of intensity profiles, for the selection of the optimal plan among the degenerate configurations for treatment delivery.