This paper introduces an automatic magnetic field distribution measurement system for traveling wave tube magnetic ring based on virtual instrument, which is mainly used to measure the axial magnetic field strength of TWT magnetic bunching system. The hardware system consists of optical table, non-magnetic chuck, motor controller, electronically controlled translation platform, high-precision Gauss meter, etc. In the LabWindows/CVI virtual instrument programming environment, modular development and debugging of measurement software are carried out, and finally the distributed measurement of the axial magnetic field of the traveling wave tube is achieved.