While cosmic ray muons themselves are relatively easy to veto in underground detectors, their interactions with nuclei create more insidious backgrounds via: (i) the decays of long-lived isotopes produced by muon-induced spallation reactions inside the detector, (ii) spallation reactions initiated by fast muon-induced neutrons entering from outside the detector, and (iii) nuclear recoils initiated by fast muon-induced neutrons entering from outside the detector. These backgrounds, which are difficult to veto or shield against, are very important for solar, reactor, dark matter, and other underground experiments, especially as increased sensitivity is pursued. We used fluka to calculate the production rates and spectra of all prominent secondaries produced by cosmic ray muons, in particular focusing on secondary neutrons, due to their importance. Since the neutron spectrum is steeply falling, the total neutron production rate is sensitive just to the relatively soft neutrons, and not to the fast-neutron component. We show that the neutron spectrum in the range ∼ 10-100 MeV can instead be probed by the (n, p)-induced isotope production rates 12 C(n, p) 12 B and 16 O(n, p) 16 N in oil-and water-based detectors. The result for 12 B is in good agreement with the recent KamLAND measurement. Besides testing the calculation of muon secondaries, these results are also of practical importance, since 12 B (T 1/2 = 20.2 ms, Q = 13.4 MeV) and 16 N (T 1/2 = 7.13 s, Q = 10.4 MeV) are among the dominant spallation backgrounds in these detectors. PACS numbers: 25.30.Mr, 25.40.Sc, 96.40.Tv