The ban was approved by a vote of 68 percent to 32 percent in final, unofficial returns.
The balloting marked the first public vote on a local government measure to crack down on illegal immigration.
"It says especially to Congress that we're tired of the out-of-control illegal immigration problem. That if Congress doesn't do something about it, cities will," said Tim O'Hare, a City Council member who was the ordinance's lead proponent.
The ordinance requires apartment managers to verify that renters are U.S. citizens or legal immigrants before leasing to them, with some exceptions.
Property managers or owners who break the rule face a misdemeanor charge punishable by a fine of up to $500.
Council members approved the ordinance in November, then revised it in January to include exemptions for minors, seniors and some families with a mix of legal residents and illegal immigrants.
Farmers Branch has become the site of protests and angry confrontations, and opponents of the regulation gathered enough signatures to force the city to put the measure on the municipal election ballot.
With Saturday's approval of the ban, opponents plan to fight it in court, and will seek a restraining order to stop the city from enforcing it.
The city was already facing four lawsuits brought by civil rights groups, residents, property owners and businesses who contend the ordinance discriminates and that it places landlords in the precarious position of acting as federal immigration officers. Their attorneys say the ordinance attempts to regulate immigration, a duty that is exclusively the federal government's. One lawsuit also alleges the council violated the state open meetings act when deciding on the ordinance.
O'Hare contends the city's economy and quality of life will improve if illegal immigrants are kept out.
Around the country, more than 90 local governments have proposed, passed or rejected laws prohibiting landlords from leasing to illegal immigrants, penalizing businesses that employ them or training police to enforce immigration laws.
Local proposals aimed at regulating illegal immigration often fail to pass constitutional muster, said Muzaffar Chishti, director of the Migration Policy Institute office at New York University School of Law.
"There is significant frustration, so that's what's driving it," Chishti said. "But the simple fact is they cannot do too much other than impress upon the Congress the need for immigration reform."