Pena's resignation came hours after the Royals fell to a major league-worst 8-25.
Royals spokesman Aaron Babcock said Pena would be replaced on an interim basis by bench coach Bob Schaefer.
Pena looked especially distraught after Kansas City's Angel Berroa committed a base-running blunder in the ninth.
With his team trailing 3-1, Berroa led off the inning with a double, but he was doubled off second base after Mike Sweeney flied out to center fielder Vernon Wells, whose throw to second beat a slowly retreating Berroa.
"I think he went too far and there was no reason for him to get into the double play when we're down two runs," Pena said hours before his resignation became public. "We had some chances today. You can't take anything away from Roy, he did a great job. He's one of the tougher pitchers in this league. We had some opportunities, but made a mistake and we paid for the mistake."
The Royals were one of baseball's biggest surprises in 2003, Pena's first full season. They went 83-79 and contended into September before finishing third in the AL Central, earning Pena manager of the year honors. It was the team's first winning season since 1994.
The Royals were expected to challenge for the division crown last season, but got off to a terrible start and traded star center fielder Carlos Beltran in June. They wound up losing a team-record 104 games.
Kansas City general manager Allard Baird said Pena will be offered a position within the organization.
The Royals failed again to produce for starter Zack Greinke (0-4), who allowed three runs and six hits in the first complete game of his career. Greinke has received just nine runs of support in his seven starts.
"The first inning looked like we were going to get a couple and things were looking good in the dugout, but it just didn't happen," Greinke said. "When you have Roy out there pitching, it's tough."
Shea Hillenbrand hit a two-run homer for the Blue Jays, who struggled before playing the Royals. Toronto has won two straight against Kansas City after losing their previous four games overall.
Halladay made quick work of the undisciplined Royals.
"I tried to get them to put the ball in play as early as I could," Halladay said. "We knew they have a lot of guys that swing early."
Halladay (5-2) allowed one run and eight hits, while striking out five and walking none for his 18th career complete game and his first since April 29, 2005, against the New York Yankees.
The 2003 AL Cy Young Award winner followed up a brilliant three-hitter in a win over Randy Johnson and the Yankees on April 29 with a lackluster effort in a 5-1 loss to Baltimore last Wednesday.
"Roy's a bulldog out there. You know he's going to come right at you with his power sinker and power cutter and big 12-to-6 curveball, that's why he won the Cy Young," Sweeney said. "He threw a complete game in an hour and 44 minutes. That's why he's one of the best."
Sweeney homered in the first inning, his seventh home run in his last nine games. He has 29 of Kansas City's 108 RBI (27 percent).
The homer came right after Halladay had thrown out Berroa after being struck on the hand by his comebacker. Halladay experienced some numbness, but didn't blame it for the homer.
"I just got away from my game plan," Halladay said. "I think that hurt me more than the thumb."
Sweeney compared Greinke to Halladay.
"The center of Toronto's pitching staff is Roy Halladay. Ours and our future is Zack Greinke. I think he showed baseball that he can pitch up here with the best," Sweeney said.
Hillenbrand hit a two-run homer off Greinke, his third of the season and his first since April 16, at Texas.
Toronto's Eric Hinske tripled in the second and scored on Ken Huckaby's RBI single.
- Kansas City DH Ken Harvey was a late scratch because of back tightness.
- The Royals are 3-8 on their road trip.
- The Blue Jays were swept in three of their previous home series this season.
- Toronto C Gregg Zaun thinks he'll return to the lineup in two weeks. Zaun sustained a concussion while breaking up a double play Sunday against Chicago. "There are some small lingering affects of the head trauma, headaches that come and go, but today has been great. I haven't had a headache yet," Zaun said.