•The law, which cuts the window for abortion in the state down from 20 weeks, will now take effect on 1 July.
•"Shame! Shame! Shame!" protesters in the statehouse started shouting.
North Carolina lawmakers have voted to override the governor's veto of a ban on most abortions after 12 weeks.
The measure was passed by the state's Republican-controlled legislature in early May, but was vetoed by Democratic Governor Roy Cooper over the weekend.
Republicans overturned the veto in back-to-back votes, prompting chants of "shame" from onlookers.
The law, which cuts the window for abortion in the state down from 20 weeks, will now take effect on 1 July.
On Tuesday, the state Senate voted 30-20 and the House by 72-48 to override the veto. A single Republican defector could have tipped the outcome the other way.
"Shame! Shame! Shame!" protesters in the statehouse started shouting.
Officially known as the Care for Women, Children and Families Act, it was passed by the state Senate along party lines on 4 May, a day after being passed by the state House of Representatives.
The measure was vetoed by Governor Cooper at a rally on Saturday. He said the bill would stand "in the way of progress" and "turn the clock back 50 years on women's health".
The legislation bans abortion at 12 weeks except in cases of rape, incest and medical emergencies. It mandates that any abortions taking place after that period be carried out in a hospital.
The exceptions in the case of rape and incest are until 20 weeks of pregnancy, or in the event of a "life-limiting anomaly", up to 24 weeks.
The law also restricts use of abortions pills after 10 weeks of pregnancy and puts in place additional requirements, such as an in-person consultation with a doctor ahead of the procedure.
Republicans hold slim supermajorities in both chambers of the statehouse, giving them the ability to override a veto from the Democratic governor.
Near-total abortion bans have been passed by 14 states in the US since the Supreme Court ended the nationwide right to abortion last year.
North Carolina saw abortions rise 37% in the wake of the Supreme Court ruling, according to the Society of Family Planning, a non-profit that advocates for abortion rights and research.
The increase was largely driven by women travelling to North Carolina from other parts of the southern US, where restrictions are now largely restricted.