Leroy is a boy's given name, coming from the French family name Leroy. 'Le Roi' literally meant 'the king'. Leroy was a very popular name in the late 1800s and early 1900s, hitting it's peak popularity from 1910-1930. It has decreased steadily in popularity since then, although it is currently still (just barely) in the top 1000 baby names for boys in the US.
We don't know exactly where the family name Leroy came from. The most common theory is that Leroy was originally an
occupational name given to someone who worked for the king. It is also possible that Leroy was a nickname for someone who put on
royal airs, or who played the role of king at festivals. In America, the name of Leroy remains popular in areas where the French settled, such as Louisiana.
Today there is a strong social perception that Leroy is either an African-American name or a good-ol' southern boy name. It is frequently used in comedy; if you are considering naming a child Leroy, you should be aware of the character Leroy Jenkins from the film Which Way Is Up (1977), and the more recent internet meme of Leeroy Jenkins; despite these examples, Leroy remains a generally acceptable name for a child.
Leroy is often shortened to either Lee or Roy, but these names have histories of their own, and do not share an origin or meaning with Leroy.