In 2014, he scored both the Western Conference Finals winning goal and Stanley Cup Finals winning goal - both in overtime.
Martinez was born in the Detroit suburb of Rochester Hills, Michigan. His paternal grandfather is Spanish and his paternal grandmother is English Canadian. He spent his early years playing hockey in Northern California for the Santa Clara Blackhawks and San Jose Jr. Sharks. He earned four varsity letters at Stoney Creek High School in Rochester Hills.
He played college hockey while attending Miami University in Oxford, Ohio.
He was drafted 95th overall by the Los Angeles Kings in the 2007 NHL Entry Draft while playing for Miami University. He made his professional debut for the Kings' American Hockey League (AHL) minor league affiliate, the Manchester Monarchs, in 2008. A year later, he was announced to the opening roster for the 2009–10 season with Kings, in which he played four games and had no goals and no assists on six shots on goal.
He was sent back down to the Manchester Monarchs for the first 20 games of the 2010–11 season. On November 23, 2010, he was recalled by the Los Angeles Kings to replace the struggling Jake Muzzin. On November 24, Martinez scored his first NHL goal, on the power play, in 4–1 loss to the Montreal Canadiens at the Bell Centre against goaltender Carey Price. Martinez had his first multi-point game December 4, 2010, including a goal against Chris Osgood of the Detroit Red Wings in a 3–2 victory for the Kings. After joining the squad for the 2010–11 season, Martinez earned trust from former Kings Head Coach Terry Murray for solid offensive and defensive play, and that continued after Darryl Sutter replaced Murray in December 2011.
On July 8, 2011, Martinez signed a two-year, $1,475,000 contract with the Kings. On June 11, 2012, the team won the Stanley Cup.
With the 2012–13 NHL season being threatened by a lockout that ultimately wiped out half the season, on December 31, 2012, Martinez signed with the Allen Americans of the Central Hockey League. He played with them until the end of the lockout.
Martinez was injured for 10 of the Kings' first 15 games of the 2013–14 season, but wound up returning as a regular on the Kings' defense, even contributing to the team's offense.
He scored two series winners en route to the Kings' second Stanley Cup title – on June 1, 2014, Martinez scored 5:47 into overtime of Game 7 of the Western Conference Finals against the Chicago Blackhawks; 12 days later, in Game 5 of the 2014 Stanley Cup Finals against the New York Rangers, a shot by Tyler Toffoli, which rebounded off goaltender Henrik Lundqvist in double overtime, led to another Martinez goal. The goal was scored with 5:17 left in double overtime as he became only the 17th man in Stanley Cup playoff history to score the Cup-winning goal in overtime. He became the first to do it since Patrick Kane in 2010 and the first to do it at home since Bob Nystrom in 1980.