The estimated error of the standard model prediction for the anomalous magnetic moment of the muon comes almost exclusively from hadronic vacuum polarization and hadronic light-by-light scattering, where the latter is dominated by exchanges of neutral pseudoscalars and axial vector mesons. Using holographic QCD we are able to calculate these contributions and to solve the problem of most phenomenological models to satisfy the known short-distance constraints of the hadronic light-by-light tensor, in particular the one implied by the axial anomaly pointed out by Melnikov and Vainshtein.