Rios hit a two-run homer, Mike Aviles singled twice and drove in the game's first run, and Puerto Rico reached its first WBC final with a big assist from the bullpen.
Relievers Jose De La Torre and Xavier Cedeno each worked out of jams while pitching key moments after winning pitcher Mario Santiago left in the fifth inning with a forearm injury.
Team Puerto Rico will play in Tuesday night's championship against either the Netherlands or the Dominican Republic. Those teams meet in the tournament's second semifinal Monday night.
Aviles hit a bloop single to center to put Puerto Rico on the board in the first and singled again to start the seventh before Rios hit a towering drive into the left-field seats.
Unlike the two previous WBC winners from Japan, this team was devoid of major leaguers. Hirokazu Ibata drove in the team's lone run with an eighth-inning single against Randy Fontanez, but Japan missed a chance with a costly baserunning blunder.
World Baseball Classic
At San Francisco
Puerto Rico 3, Japan 1
Netherlands vs. Dominican Republic, 7 p.m.
Semifinal winners, 6 p.m.