General symmetry principles for rotor-synchronized pulse sequences in magic-angle-spinning solid-state nuclear magnetic resonance are presented. The theory of symmetry-based pulse sequences using π pulse elements is presented for the first time. The symmetry theory is extended to the case of generalized Hartmann-Hahn sequences, in which rotor-synchronized rf irradiation is applied simultaneously to two isotopic spin species. The symmetry principles lead to heteronuclear selection rules. The symmetry theory is used to design pulse sequences which implement heteronuclear dipolar recoupling at the same time as decoupling homonuclear spin-spin interactions, and which also suppress chemical shift anisotropies. A number of specific pulse sequences based on these principles are listed. Experimental demonstrations are given of heteronuclear two-dimensional correlation spectroscopy, heteronuclear multiple-quantum spectroscopy, and the estimation of internuclear dipolar couplings.