The 23-year-old, who made his Munster debut in 2010, has made 43 appearances for the club and captained the side at the beginning of the season.
"I am delighted to have my future sorted and to commit to Munster. It has been a really enjoyable journey so far for me in my career and the last two seasons in particular have been exciting, from breaking into the Munster team and captaining the side and then earning my first cap for Ireland," he told the club's official website.
"I'm thoroughly enjoying my rugby at the moment and feel there is much more that we can achieve with Munster and Ireland over the next couple of years and I wanted very much to be a part of that."
O'Mahony has made eight international appearances for Ireland.