The study aims to explore the accumulation characteristics of heavy metals in greenhouse vegetable soil under different planting patterns. ICP-MS and dual-channel atomic fluorescence spectrometer were used to measure heavy metal content in soil by a long-term greenhouse experiment set up in 2002, and the variation characteristics of heavy metal content with planting years were analyzed. The accumulation of soil heavy metals and potential ecological risks were assessed based on single factor pollution index method and Nemerow integrated factor pollution index method, and the correlation between soil physiochemical properties and heavy metal accumulation was analyzed. The results are as follows. (1) The contents of Cd, Cu, Zn, Cr, Pb, As and Ni under three planting patterns accumulated in varying degrees, and increased with the extension of planting years, and heavy metals’ content did not exceed the risk control standard for soil contamination of agricultural land except Cd. (2) The analysis of single factor pollution index (Pi) showed that Cd belonged to slight pollution level, while other elements belonged to clean level under the three planting patterns, in addition, Nemerow integrated factor pollution index (P) analysis showed that all elements belonged to slight pollution level under the three patterns. (3) The potential ecological risk coefficient (Ei) value of each element was Cd>As>Cu>Pb>Ni>Cr>Zn; among them, Cd content implied very strong ecological risk in organic pattern (ORG), and strong ecological risk in low-input pattern (LOW) and conventional pattern (CON), while other elements were at the slight level. The potential ecological risk indexes (RI) of the three patterns were at medium ecological pollution level, with the value of ORG > LOW > CON, indicating higher risk of heavy metal pollution in ORG. (4) Soil organic matter was significantly negatively correlated with pH (P<0.01) and positively correlated with Zn, Cu and Cd (P<0.05), and pH was negatively correlated with Zn, Cu and Cd (P<0.05), while a significantly positive correlation was found between Zn and Cu, Pb and Ni, and Cu and Cd (P<0.05). Application of organic fertilizer might be one of the main factors leading to soil heavy metal pollution. Therefore, the authors suggested that in organic production, the content of heavy metals in organic fertilizer raw materials should be strictly specified, and the application amount of organic fertilizer should also be properly controlled.