This work studies the idea of using strong transverse magnetic (B) fields with high-energy photon beams to enhance dose distributions for conformal radiotherapy. EGS4 Monte Carlo code is modified to incorporate charged particle transport in B fields and is used to calculate effects of B fields on dose distributions for a variety of high-energy photon beams. Two types of hypothetical B fields, curl-free linear fields and dipole fields, are used to demonstrate the idea. The major results from the calculation for the linear B fields are: (1) strong transverse B fields (> 1 T) with high longitudinal gradients (G) (> 0.5 T/cm) can produce dramatic dose enhancement as well as dose reduction in localized regions for high-energy photon beams; (2) the magnitude of the enhancement (reduction) and the geometric extension and the location of this enhancement (reduction) depend on the strength and gradient of the B field, and photon-beam energy; (3) for a given B field, the dose enhancement generally increases with photon-beam energy; (4) for a 5 T B field with infinite longitudinal gradient (solenoidal field), up to 200% of dose enhancement and 40% of dose reduction were obtained along the central axis of a 15 MV photon beam; and (5) a 60% of dose enhancement was observed over a 2 cm depth region for the 15 MV beam when B = 5 T and G = 2.5 T/cm. These results are also observed, qualitatively, in the calculation with the dipole B fields. Calculations for a variety of B fields and beam configurations show that, by employing a well-designed B field in photon-beam radiotherapy, it is possible to achieve a significant dose enhancement within the target, while obtaining a substantial dose reduction over critical structures.