Monte Carlo (MC) method is a statistical method for simulating photon propagation in media in the optical molecular imaging field. However, obtaining an accurate result using the method is quite time-consuming, especially because the boundary of the media is complex. A voxel classification method is proposed to reduce the computation cost. All the voxels generated by dividing the media are classified into three types (outside, boundary, and inside) according to the position of the voxel. The classified information is used to determine the relative position of the photon and the intersection between photon path and media boundary in the MC method. The influencing factors and effectiveness of the proposed method are analyzed and validated by simulation experiments.