Japan coach Alberto Zaccheroni, worried after they lost their final two matches in Asia's penultimate qualifying round, fielded nine Europe-based players including CSKA Moscow midfielder Keisuke Honda in the first team.
"It was great as everything went the way as I had imagined," said the 23-year-old Kagawa, who helped Dortmund to their second straight Bundesliga title. "But we could not score goals on scoring chances. In that sense, we have to improve toward our next game."
Japan will fight three FIFA World Cup qualifiers in June. They host Oman on 3 June and Jordan five days later before facing regional arch-rivals Australia away on 12 June in Asia's Group B, which also includes Iraq.
Azerbaijan, grouped with Portugal, Russia, Israel, Northern Ireland and Luxembourg, are to open their qualifiers against Israel at home in September.
Kagawa squandered a chance only two minutes into the match, taking a long ball from Wolfsburg's Makoto Hasebe on the left side to face Azerbaijan goalkeeper Kamran Aghayev one-on-one. But his left-footer veered off the far post.
Hasebe also fed a precision pass to Novara frontman Takayuki Morimoto in the 17th minute but his shot into the net was ruled offside. Honda, playing in his first international for nine months, failed to demonstrate his dead-ball skills when his free-kick in the 24th minute scraped past Aghayev's hand and bounced off the right post.
Kagawa breaks deadlock
Japan finally got on the scoreboard on 42 minutes when Kagawa took a through pass from Hasebe, faked out a defender and slammed a right-footer into the right side of the net.
Azerbaijan missed a chance in the 47th minute when striker Jihan Ozkara dribbled forward but his shot strayed into the outside of the net without bothering Japanese goalkeeper Eiji Kawashima.
Okazaki scored Japan's second goal on 58 minutes when he flicked into the net a headed ball from Honda after Kagawa crossed into the box.The visitors all but pulled one back in the 72nd minute when Agil Nabiyev volleyed a long pass in front of Kawashima but the ball bounced off the right post.