We have developed a low-energy electron recoil (ER) calibration method with $^{220}$Rn for the PandaX-II detector. $^{220}$Rn, emanated from natural thorium compounds, was fed into the detector through the xenon purification system. From 2017 to 2019, we performed three dedicated calibration campaigns with different radon sources. We studied the detector response to $alpha$, $beta$, and $gamma$ particles with focus on low energy ER events. During the runs in 2017 and 2018, the amount of radioactivity of $^{222}$Rn were on the order of 1% of that of $^{220}$Rn and thorium particulate contamination was negligible, especially in 2018. We also measured the background contribution from $^{214}$Pb for the first time in PandaX-II with the help from a $^{222}$Rn injection. Calibration strategy with $^{220}$Rn and $^{222}$Rn will be implemented in the upcoming PandaX-4T experiment and can be useful for other xenon-based detectors as well.