Captain Tetsuya Saito was also on the scoresheet while 29-year-old World Championship debutant Michikazu Hata recorded 20 saves in an even opener in Tondiraba Icehall.
"I think we played well but we have to fix a couple of things to get better," said Hirano, voted Japan´s Best play of the game and who is one of nine new players from last year´s silver medaling roster.
"Ukraine has a lot of big guys and we have to hit and battle more as we have a lot of smaller guys," he said.
Vitali Lyalka and debutant Pylyp Pangelov-Yuldashev tallied for Ukraine while captain Andri Mikhnov had a couple of assists.
Japan opened the scoring when a Sato blast from the right circle saw Bogdan Dyachenko made the initial save, but Hirano´s effort just glided under right pad and over the line for the opener at 4:43.
"It was a good shot from the D-Man and I actually thought I would not score as their goalie made a nice save. Everybody was a little bit nervous, so that goal felt good," said Hirano.
Ukraine tied proceedings at 8:16. Sailing into Japan´s defensive zone and from top of the right faceoff circle, Vitali Lyalka unleashed a thundering shelf wrister in the top corner after a pass from Mikhnov.
With their trademark burst of speed Japan Hirano and Sato combined with the latter beating Ukraine´s defensive rearguard of Danil Skrypets and Andri Grygoryev for pace and coolly slotted home Japan´s second with 7:08 left of the opening frame.
Instead, it was Japan who stretched the lead with 2:18 left of the frame. Yushi Nakayashiki twisted and turned down the lefts of boards in Ukraine´s defensive zone before whipping a shot at net tipped home high past by captain Saito.
But Ukraine got rewarded for their hard graft in the middle frame and struck back 15 seconds for the buzzer. Pylyp Pangelov-Yuldashev scored through traffic after once again the two-metre man Mikhnov.
In the third frame, Ryo Hashimoto struck one off the post from the left hashmarks when Vsevolod Tolstushko was serving a hooking call. Saito went close for Japan on a breakaway before in the next attack, Ukraine´s Lyalko was slashed when through and a golden opportunity arose for them to find an equalizer on the powerplay.
Following a time-out by Japan, Dyachenko was yanked by Ukraine head coach Andri Sryubko with 51 seconds to go. Ukraine sent in the tried and tested Lyalko, Mikhnov and Nikita Butsenko, but to no avail, as they opened their campaign with a sore defeat.
"I felt we were better and we played pretty good hockey, but in the end, we lost. We will be ready for tomorrow," said Ukraine´s debutant blueliner Igor Merezhko as they get ready for a clash with neighbours Poland tomorrow full of confidence.
"We were unlucky today, but we will now regroup ahead of Poland. We are the better team, skilled, fast and young," he said.
Japan returns to action tomorrow against Romania during day two of the World Championship Division I Group B.