They were hoping to take complete control of the Pacific. Their idea was to attack Midway and when the last remaining naval forces show up from Hawaii to fight, the Japanese could ambush them and ruin the US navy and effectively control the entirety of the Pacific ocean. However, they failed because they were ambushed instead and were obliterated.