In the episode "The Client" from season two of The Office, Dwight Schrute gives Michael the "World's Best Boss" mug. Dwight had intended to give the mug to himself, but Michael was pleased with the gift and kept it.
It is not specified in any definite source who gave Michael Scott the "World's Best Boss" mug. In the TV series "The Office," it is shown that the mug was already on Michael's desk when he became the regional manager of Dunder Mifflin Scranton.