In order to grasp the distribution of carbon flow in the operation of distribution system, a carbon flow tracking method suitable for distribution system with distributed energy resources is proposed based on complex power distribution matrix by introducing carbon emission flow theory. Firstly, the characteristics of carbon emission flow in distribution system are studied, and based on the accurate power flow results of distribution system with distributed energy resources, a complex power distribution matrix is constructed to obtain the distribution of power generated by generators at each node in lossy network. Then, based on the complex power flow tracking model considering the network loss, a carbon tracking model is established, which realizes the accurate tracking of carbon flow. Finally, the simulation results of IEEE 33-node system and PG&E 69-node system in the United States show that the proposed carbon flow tracking method can accurately measure the carbon emission distribution in the distribution system, and can provide reference for the allocation of carbon emission responsibility and the formulation of carbon emission reduction measures on the user side.