Limited by the sparse light-splitting capability in WDM networks, some nodes need to reroute the optical packet to different destination nodes with the high cost of routing for reducing packet loss possibility. In the paper, the longest path reroute optimization algorithm is put forward to jointly optimize the multicast routing cost and wavelength channel assignment cost for sparse splitting WDM networks. Based on heuristic algorithms, the longest path reroute routing algorithm calls multiple longest paths in existing multicast tree to reroute the path passing from the nodes which are violating the light-splitting constraint to the nodes which are not violating light-splitting constraint with few wavelength channels and low rerouting cost. And a wavelength cost control factor is designed to select the reroute path with the lowest cost by comparing the multicast rerouting path cost increment with the equivalent wavelength channel required cost increment. By adjusting wavelength cost control factor, we can usually get the optimized multicast routing according to the actual network available wavelength conversion cost. Simulation results show that the proposed algorithm can get the low-cost multicast tree and reduce the required number of wavelength channels.