The decision was handed down Friday in New Westminster.
Campers near Jubilee Park in the centre of the Fraser Valley city have until 4 p.m. Saturday to leave the lot.
The city took legal action after about 20 people set up a wooden barricade as a wind break around several tents in the encampment.
The injunction is the latest in a series of disputes between homeless residents and the city.
Officials apologized earlier this year for dumping chicken manure on the grounds of a different camp in Abbotsford in an effort to oust the homeless. (CKNW)
Also on HuffPost