Marshall, who won 81 caps for New Zealand, faces competition for the Ospreys scrum-half role from Wales international Mike Phillips next season.
But Phillips' impending six-figure switch from Cardiff Blues has not deterred Marshall, who left Leeds for a new career in Wales last year.
Ospreys rugby director Kevin Hopkins said: "We are delighted that a player of Justin's calibre has shown commitment to the region by extending the term of his contract.
"This not only demonstrates his loyalty to this region, but also reflects well on the region as a whole and on its ambition."



