Abstract Accurately and quickly obtaining the positions and orientations of mechanical parts based on the digital morphologies of mechanical parts are the key to achieving efficient and accurate assembly of mechanical parts. However, due to poor robustness and compactness in extracting digital morphology contours of mechanical parts, the accuracy of assembly positions and orientations obtained by using digital morphology contours cannot meet the requirements of high-precision assembly. Therefore, this paper proposes a position and orientation estimation method based on 3D digital morphology contour registration. This method extracts and optimizes digital morphology contours of mechanical parts and obtains the assembly positions and orientations by using an improved iterative closest point method to register the extracted digital morphology contours with those of the mechanical parts in assembly targets with desired positions and orientations. Experiments are conducted using mechanical parts from the ABC dataset and inertial confinement fusion micro-target. From the experimental results, when using the assembly positions and orientations obtained through the method proposed in this paper to assemble mechanical parts, it can achieve translation absolute errors of 8 μm, 5 μm, and 9 μm along the X-, Y-, and Z-axes, respectively. Similarly, the angular absolute errors in rotations around the Z-, Y-, and X-axes can be less than or equal to 0.16°, 0.15°, and 0.11°, respectively. The results prove that the proposed method in this paper exhibits high computational efficiency and accuracy, providing an effective approach for digital assembly of mechanical parts.