More than 25,000 police officers using vehicles and drones have monitored the herd, and altogether 180 tons of food were left in order to prevent elephants from attacking locals.
In addition, electric fences, baits and artificial roads have been used to ensure the animals followed the correct path.
Since then they have made international headlines with an extraordinary 500km (300-mile) trek that has seen them wander through fields, towns and cities, eating millions of dollars worth of crops and damaging buildings.
As the herd approached settlements, people were temporarily relocated to prevent conflict as local residents tried to protect their crops and homes.
By June the animals had reached the outskirts of the provincial capital of Kunming.
pgh/Pll/msm / ymr