Florida's Jeremy Hermida had two hits, including a solo homer in the fourth that drove in the eventual winning run.
Matt Treanor had two hits, including a two-run single in the second for the Marlins, who have split their last six games.
Kim (4-4) gave up three hits and two earned runs in 6 1/3 innings with two walks and seven strikeouts.
San Diego got its runs on a triple by Marcus Giles in the first and a double by Michael Barrett in the seventh.
The NL West-leading Padres have split their last four games.
The loser was all-star Jake Peavy (9-3).
Celebrity Breakups and divorces of 2014 [PHOTOS]