The invention discloses a hull grid automatic division method based on a virtual test platform. The method comprises the following steps: S1, identifying a molded line, a vertical line and a design waterline of a ship according to basic information, a three-dimensional model and a molded value table; s2, creating a calculation domain of the ship according to the molded line, the vertical line, thedesign waterline and predefined creation information; s3, dividing a curved surface of a hull and curvature information of the curved surface of the hull according to the molded line to generate hullsurface grids; s4, according to the hull surface grid, generating a boundary layer grid for capturing flow change of the fluid passing through the surface of the hull; and S5, based on the hull surface grid, the boundary layer grid and the computational domain, generating a hull grid which comprises a near flow field and a far flow field and is used for outputting. The method can adapt to automatic generation of grids of most ship types, the grid generation time during ship CFD calculation is saved, and a foundation is laid for finally achieving systematic numerical optimization of the ship types.