This study aimed to evaluate the effects of liming on soil fertility, growth, nutrition and production of red pitaya (Hylocereus monacanthus) plants cultivated in pot. The experiment was conducted in blocks, with five doses of limestone (0.0; 0.6; 1.2; 1.8; and 2.5 t ha − 1) and four replicates. Corrective doses were established to achieve base saturation of 20 to 70%. Liming increased soil pH (4.5 to 6.7), Ca concentration (5.36 to 20.11 mmolc dm − 3), Mg concentration (4.36 to 16.53 mmolc dm − 3) and base saturation (23.69 to 72.61%) and reduced potential acidity (37.39 to 15.41 mmolc dm − 3). Liming reduces nitrogen concentration and increased phosphorus, calcium and sulfur concentrations in the cladodes. There was an increase in phosphorus concentration and decrease in boron and iron concentrations in fruit peel according to the increase in limestone doses; in the pulp, there was an increase in boron concentration and decrease in iron and zinc concentrations, from the lowest to the highest dose of limestone. Based on the principal component analysis, the limestone dose of 1.8 t ha − 1 increased base saturation to 59%, providing favorable chemical conditions for the growth and productivity of red pitaya.