The 32-year-old American, who is of Mexican heritage, dropped Ortiz twice in round two before putting the Cuban, 43, down again in the seventh.
Ruiz now hopes to face fellow former champion Deontay Wilder, who was ringside in Los Angeles, California.
"I want to be champion again and bring that belt back to Mexico," he said.
Ruiz has since beaten Chris Arreola and now Ortiz, with two of the judges scoring the contest 114-111 in Ruiz's favour, the other 113-112.
"I thought I did a beautiful job boxing and countering," he said. "I thought I showed some different class than I usually do instead of just pressuring him and going forward."
Ruiz now holds a record of 35 wins from 37 fights while it was the third loss of Ortiz's professional career, with the previous two both coming against former WBC champion Wilder.
Ortiz called for a rematch with Ruiz but Al Haymon is the promoter for both Ruiz and Wilder, who faces Robert Helenius next month in his first bout since suffering successive defeats by current WBC champion Tyson Fury.
"[Haymon] can make this fight [with Wilder] happen so let's do it, let's get it on," said Ruiz.
Wilder added: "We're always looking for great exciting fights we love to give the fans.
"So if that's what is lined up next, I've got to handle business and after that, we can get it on."