They were trying but not in the race.

"On May 19, 1945, a Nazi submarine was captured and discovered to be delivering 1,200 pounds of uranium oxide to the Japaneseicon military. The vessel was dispatched for Japan shortly after Adolf Hitler committed suicide, a time when the Germans wanted to dispose of their large amounts of uranium. Two Japanese officers were aboard the submarine; both committed suicide upon being captured."

Full story in link;
New evidence of Japan's effort to build atom bomb at the end of WWII