Aiming at the topology optimization problem of pipeline network of tree type water injection in oilfield system,the paper took the minimum network cost as objective function and the uniqueness of subordinate relations of station,room and well, and service capability and so on as constraint condition to establish an optimization mathematical model.A new kind of optimization algorithm-the electromagnetism-like mechanism algorithm was taken so as to solve the model.The method took the spatial locations of water injection stations and water distribution stations as charged particle.In the electric field formed by a number of charged particles, the particles moved to update the pipeline network's topology structure and the scales of water injection stations and water distribution stations under force,then achieved the optimization for network's cost was.The validation of instance showed that the optimized network cost decreased by 15.28% compared with the original cost.The result indicated the availability of electromagnetism-like mechanism algorithm on the topology optimization of tree type water injection pipeline network.