UFC officials confirmed the bout first reported by FoxSports.com.
The two were initially expected to meet in The Ultimate Fighter 17 Finale main event, but Johnson suffered an injury that forced him off the card.
Johnson (17-2-1) became the first UFC flyweight champion when he defeated Joseph Benavidez by decision at UFC 152. Johnson last fought on Jan. 26, defeating John Dodson by unanimous decision.
Moraga (13-1) is 2-0 inside the UFC Octagon with a knockout over Ulysses Gomez and a submission victory over Chris Cariaso.
UFC on Fox 8 takes place on July 27 at KeyArena in Johnson’s backyard of Seattle.