The form factor that yields the light-by-light scattering contribution to the muon anomalous magnetic moment is computed in lattice QCD+QED and QED. A non-perturbative treatment of QED is used and is checked against perturbation theory. The hadronic contribution is calculated for unphysical quark and muon masses, and only the diagram with a single quark loop is computed. Statistically significant signals are obtained. Initial results appear promising, and the prospect for a complete calculation with physical masses and controlled errors is discussed.