Martinez produced a strong display before the unbeaten challenger floored him late in the ninth in his hometown Belfast.
The referee then stopped the fight as the battling Spaniard failed to recover in what will be regarded as Frampton's toughest fight to date.
"This is amazing - I just want the people of Belfast to be proud of me," he said.
"I want to be a world champion and I am getting close. Martinez was harder to hit than I thought, and hard as nails."
The contest started slowly but then Martinez became the more aggressive, forcing Frampton on the back foot.
The second round was a more lively affair with punches rocking both fighters and the contest remained tight before Frampton landed the telling blow.
Frampton said he wants his next fight to be against British champion Scott Quigg, who sat ringside.