The right-hander had gone 10-0 with a 2.27 ERA in his last 14 starts at home prior to Tuesday.
The defeat guaranteed the club another home series loss, its fourth in a row.
Even though the 2011 D-backs dug out of a bad start to the season by going on a 16-3 run in May, right fielder Justin Upton feels like it's time to let last year go.
"It's not about last year, it's about the team this year," he said. "We can sit here and harp on last year about how well we played, but you get yourself out of a funk by going out and playing the game. There's no reason for us to think about last year's team. There's no carryover. It's a new year, we have to pick ourselves up."
After serving up the two costly home runs, Kennedy settled down the rest of the game, only allowing one hit in the last five innings before Brad Ziegler took over in the eighth.
"He had more rhythm," D-backs manager Kirk Gibson said. "He didn't have very good rhythm at the beginning of the game. He was unable to hit his spots. That team is very good. They don't leave you much room."
By overcoming the nightmare start and throwing seven innings, Kennedy saved his bullpen, which had thrown 11 1/3 over the previous three games, and allowed it to rest some.
"That's one of our jobs, whether we have it or not, try to go as long as possible," Kennedy said. "I was trying to throw up as many zeros as I could to give those guys a break."
The D-backs couldn't muster any offense against Cardinals starter Jake Westbrook. In seven scoreless innings, the righty gave up just four hits, only two of which left the infield.
"I felt really good today," Westbrook said. "That's probably the best I've felt all year as far as physically. A little erratic early with the sinker, but it came around and I was able to locate it a lot better as the game went on. It was nice to get those runs early on."
Through 12 innings so far this series, Cardinals starting pitching has dominated the D-backs, allowing no runs on seven hits and 15 strikeouts.
The Cardinals took a 2-0 lead on Beltran's first long ball, which came on a 1-0 curveball in the first inning after Jon Jay tripled to start the game.
"I didn't make a good pitch to start the game to Jay," Kennedy said. "Then the curveball was down, but that was right in [Beltran's] swing path, so it just didn't work out."
The D-backs stranded runners on first and second in their half of the first before the Cardinals delivered the knockout blow in their next at-bat.
With two outs and a runner on second, Kennedy walked Westbrook then hit Jay to again bring Beltran to the plate, this time with the bases loaded. The six-time All-Star promptly took a 2-1 fastball and dumped it into the pool pavilion for a grand slam.
"I felt early in the game that [Kennedy] was leaving balls over the plate," Beltran said. "Later in the game he was hitting the corners and his spots like he normally does. We took advantage of the opportunities, and after that, Westbrook was able to go out there and pitch a good game."
The D-backs broke up the shutout in the ninth inning when Miguel Montero doubled home Upton, who led off with a single.
"I know the character of this team," Upton said. "We'll be fine, we just have to find it. We have to get our confidence back. We've gotten beaten up but good teams come out of these things."