The first evidence for X(3872) production in relativistic heavy ion collisions is reported. The X(3872) production is studied in lead-lead (Pb-Pb) collisions at a center-of-mass energy of root s(NN) = 5.02 TeV per nucleon pair, using the decay chain X(3872) -> J/psi pi(+)pi(-) -> mu(+) mu(-) pi(+)pi(-). The data were recorded with the CMS detector in 2018 and correspond to an integrated luminosity of 1.7 nb(-1). The measurement is performed in the rapidity and transverse momentum ranges vertical bar y vertical bar < 1.6 and 15 < p(T) < 50 GeV/c. The significance of the inclusive X(3872) signal is 4.2 standard deviations. The prompt X(3872) to psi 2S yield ratio is found to be rho(Pb-Pb) = 1.08 +/- 0.49(stat) +/- 0.52(syst), to be compared with typical values of 0.1 for pp collisions. This result provides a unique experimental input to theoretical models of the X(3872) production mechanism, and of the nature of this exotic state.