  In this work, we calculate the next-to-leading-order (NLO) QCD corrections to
the process $p+p \to J/\psi + \gamma$ via the color-singlet mechanism at the
LHC. The results show that the partial cross section ($p_t^{J/\psi}>$3GeV and
$|y^{J/\psi,\gamma}|<$3) is enhanced by a factor of about 2.0, and the
differential cross section can be enhanced by two orders of magnitude in the
large transverse momentum region of $J/\psi$. Furthermore, the polarization of
$J/\psi$ changes from transverse polarization at leading-order to longitudinal
polarization at NLO. For the inclusive $J/\psi$ hadroproduction, it is known
that the color-octet contributions are one order of magnitude larger than the
color-singlet contribution, and the polarization distribution is dominated by
the color-octet behavior at NLO. In contrast, for $J/\psi+\gamma$ production
the color-singlet contribution is of the same order as the color-octet
contribution, and the polarization distribution arises from both the
color-singlet and color-octet. Therefore, measurements of $J/\psi$ production
associated with a direct photon at the hadron collider could be an important
supplement to testify the theoretical framework treating with the heavy
quarkonium. In addition, an NLO QCD correction to $\Upsilon+\gamma$ production
at the LHC is also presented in this paper.
