This article reports the first measurement of prompt chi(c1) and chi(c2) charmonium production in nuclear collisions at Large Hadron Collider energies. The cross-section ratio sigma(chi(c2))/sigma(chi(c1)) is measured in pPb collisions at root s(NN) = 8.16 TeV, collected with the LHCb experiment. The chi(c1,2) states are reconstructed via their decay to a J/psi meson, subsequently decaying into a pair of oppositely charged muons, and a photon, which is reconstructed in the calorimeter or via its conversion in the detector material. The cross-section ratio is consistent with unity in the two considered rapidity regions. Comparison with a corresponding cross-section ratio previously measured by the LHCb Collaboration in pp collisions suggests that chi(c1) and chi(c2) states are similarly affected by nuclear effects occurring in pPb collisions.