Heaslip is the second Leinster star to reveal they will be staying with the club in the past few days, following fellow Lions team-mate Sean O'Brien in committing his future to the province.
"It is great to have signed on for another three years with Leinster," said the Lions No.8, who started the first and second Tests against Australia last summer.
"Leinster is where I wanted to continue playing and I am happy that the process is now at end. I am looking forward to playing my role in driving success for both Leinster and Ireland."
Heaslip has 60 caps for Ireland, and started all three Tests for the Lions against South Africa in 2009.
He helped Ireland to the Grand Slam in 2009, and has three European Cup winners' medals with Leinster, having made his debut in 2006.
"We are delighted that Jamie has committed his future to Leinster and Ireland for the next three years," said Irish RFU chief executive Philip Brown.
"He has been one of most consistent performers and top No.8s in world rugby for many years and has played a starring role for Leinster, Ireland and the Lions."