The Nets snapped a six-game losing streak and moved within a half game of Atlanta for the final playoff berth in the Eastern Conference.
New Jersey overcame a 42-point night by LeBron James, who also had 11 rebounds and seven assists.
The Nets almost let a 17-point lead get away, but held on to win for the first time this month.
With New Jersey clinging to a one-point lead, Marcus Williams went to the line and made the first free throw. He missed the second, but Carter was there for the rebound and he followed with two free throws to give New Jersey a 102-98 lead with 14 seconds to go.
New Jersey shot 61 percent from the field in the first half.