This invention discloses a method and system for live-line working based on the fusion of lidar and visual recognition. The method includes: transforming lidarpoint cloud data into coordinates and calculating the weighted height difference using an extrinsic parameter optimization strategy, then performing adaptive weighted fusion with switch images through different feature extraction branches; registering the power equipmentpoint cloud and environmental point cloud in the lidar point cloud data using an IMLS-ICP algorithm based on improved intensity consistency, and using a lidar-visual inertial odometry fusion algorithm for poseestimation and optimization to obtain the globally optimal pose and construct a three-dimensional environment model based on it; using the globally optimal pose as the starting point, the switch position as the ending point, and the three-dimensional environment model as the map, within the safe area defined by electric fieldsimulation on the map, planning an obstacle avoidance path using an improved A* algorithm including electric field strength constraints, and controlling a robotic arm to perform gear shifting operations according to the obstacle avoidance path. This invention improves the safety and efficiency of live-line working.