Martinez is the second significant signing for Al Nassr Jorge Jesus' team this summer, after the Saudi club acquired the Portuguese forward Joao Felix from Chelsea.
"Al Nassr officially signed a contract with the Spanish star Inigo Martinez as a free agent," the club stated in an announcement.
"Inigo's contract will remain valid until 2026," Al Nassr added.
The 34-year-old defender, who achieved a domestic treble with Barcelona last season, began his career at Real Sociedad before transferring to Athletic Bilbao in 2018.
Martinez, who joined Barca in 2023, has earned 21 international caps.
Al Nassr, after extending Cristiano Ronaldo's contract for an additional two seasons, is gearing up to face Al Ittihad in the semi-finals of the Saudi Super Cup on August 19.