After impressing for the South Island outfit, he was selected for the All Blacks squads for the British & Irish Lions tour and Tri-Nations series, playing five Tests.
Ryan was also a member of the New Zealand Under-19 teams which earned back-to-back World Championships in 2001 and 2002, and the Under-21 world champions of 2004.
Otago RFU chief executive Russell Gray said: "This is tremendous news for Otago. James made a big impact on the international scene this year and I believe other unions had shown strong interest in him. We are delighted that he has decided to stay with us."
Gray confirmed Anton Oliver's decision to sign a new deal influenced Ryan to follow suit.
"Anton staying with Otago clearly has had a significant influence on James as I'm sure it will on other players," Gray added.
NZRU deputy chief executive Steve Tew said: "James confidently stepped into the All Blacks environment this year and did well whenever he took the field.
"He is clearly enjoying his rugby in Otago and we are delighted that he has made a commitment to New Zealand rugby for another three years."