In the process of electron beam freeform fabrication (EBF3), due to the continuous change of thermal conditions and variability in wire feeding in the deposition process, geometric deviations are generated in the deposition of each layer. In order to prevent the layer-by-layer accumulation of the deviation, it is necessary to perform online geometry measurement for each deposition layer, based on which the error compensation can be done for the previous deposition layer in the next deposition layer. However, the traditional three-dimensional reconstruction method that employs structured laser cannot meet the requirements of long-term stable operation in the manufacturing process of EBF3. Therefore, this paper proposes a method to measure the deposit surfaces based on the position information of electron beam speckle, in which an electron beam is used to bombard the surface of the deposit to generate the speckle. Based on the structured information of the electron beam in the vacuum chamber, the three-dimensional reconstruction of the surface of the deposited parts is realized without need of additional structured laser sensor. In order to improve the detection accuracy, the detection error is theoretically analyzed and compensated. The absolute error after compensation is smaller than 0.1 mm, and the precision can reach 0.1%, which satisfies the requirements of 3D reconstruction of the deposited parts. An online measurement system is built for the surface of deposited parts in the process of electron beam freeform fabrication, which realizes the online 3D reconstruction of the surface of the deposited layer. In addition, in order to improve the detection stability of the whole system, the image processing algorithm suitable for this scene is designed. The reliability and speed of the algorithm are improved by ROI extraction, threshold segmentation, and expansion corrosion. In addition, the speckle size information can also reflect the thermal conditions of the surface of the deposited parts. Hence, it can be used for online detection of defects such as infusion and voids.