Swansea "parted company" with manager Michael Laudrup on Tuesday evening with veteran defender Monk and first-team coach Alan Curtis taking charge of first-team affairs "for the foreseeable future".
Laudrup had been under increasing pressure with the team winning just one of their last 10 league matches and he later signalled his intention to take legal action against the club over the move.
Wayne Routledge make the breakthrough straight after the break and headers from Nathan Dyer and Wilfried Bony made it safe.
Monk brought on Hernandez after the break due to a hamstring injury to Marvin Emnes, and he said of his decision on Sky Sports: "It's something we were working on in the week. In my mind, I had Pablo in there.
"He's got the quality and he can play wide as well. Marvin did well in the week and I thought with the dynamics and the pace, (it) would give us a threat but Marvin was feeling his hamstring at half-time and I felt it was the right time to make the substitution.
"And I know the quality Pablo has and those are the kind of balls we were practising in the week. Obviously Wayne's latched onto one and put it in so it was fantastic."
The Swans boss knows what it is like to be involved in a south Wales derby and was pleased he could keep his head to give out instructions on the pitch.
He added: "I've played in a lot of these games and I know exactly what it means.
"It's about giving information and about getting the players to know what you want to get on the pitch.
"It's important I keep a clear head and get that information to them on the pitch."
Monk admitted he was proud of his first win in charge of Swansea and hopes his players can build on this with some belief.
He added: "There is no prouder man tonight than me.
"All I cared about was that the players went out there with some belief... belief of how good they are as players.
"Confidence is the biggest thing. Half the battle is the mentality. If you can get the mentality right, the rest of it takes care of itself. The football takes care of itself if the mentality's right."
Later, at the post-match press conference, Monk revealed how he had taken advice from three former Swans managers.
"I spoke to Brendan (Rodgers), I spoke to Roberto (Martinez) and I spoke to Kenny Jackett. All people who have been here," he said.
"The support I have had here has been magnificent.
"They gave me advice which I will keep to myself, but they are guys at the very top of their game and when they are giving you good advice and wishing you well and giving you little bits and bobs, it can only help."
The Swans moved up two places into 10th ahead of Wednesday night's clash at Stoke, while lowly Cardiff remain second-bottom and three points adrift of safety after their seventh defeat from their last nine league matches.
The opening goal was man-of-the-match Routledge's first league goal of the season for the Swans, and he told Sky Sports: "It was long overdue.
"But it was obviously a massive game today and everyone knows what it means to the fans and the city. It's an important goal, and important game and a more-important three points.
"It's a massive result, three points from a derby game, and we hope to kick on from here and take that into the next match."