The 24-year-old Brazil international agreed the deal, which increases his release clause to 200m euros (£178m), on 1 July.
The clause rises to 222m euros (£200m) in the second year and 250m euros for the final three.
Neymar has scored 91 goals in 150 games for the club since his 2013 move.
"Neymar's contract extension is great news," said Barca boss Luis Enrique.
"It signifies his development with Barca and the level of performances that make him one of the best players in the world. He is comfortable at the club, with his team-mates, winning titles, and the feeling is mutual."
Neymar has won two La Liga titles, one Champions League and the Copa del Rey twice with the Spanish champions.
His transfer from Santos three years ago is being investigated by La Liga. The Catalan club say they paid 57m euros, with the player's parents receiving 40 million and Santos 17 million.
In June, they paid a 5.5m euro fine over the move after being accused of tax fraud, which they denied. Last month, the Spanish league said it wanted to know about the agreement with the Spanish Public Prosecutor's Office.
Barcelona forward Neymar has finally signed his new five-year contract, committing him to the club until 2021, over three months after it was agreed.