Gov. Beverly Perdue has said she would sign it into law.
The state House voted 62-56 on Wednesday to approve changes adopted in the Senate.
North Carolina has come late to the national movement to limit places where smoking is allowed.
By the end of this year, 31 other states and the District of Columbia will have laws banning smoke from workplaces, restaurants, bars, or some combination.
The law would allow fines up to $50 for smokers who keep puffing after being asked to stop.
Last year, North Carolina farmers produced $686 million worth of tobacco, nearly half the value of the U.S. output.