Boots were in use for millennia, but as the styles of the times evolved, it became fashionable to wear long boots that covered a part of the leg, sometimes right up to the knee. In the 1600s, the part of the boot that covered the leg came to be known as bootleg. It literally meant the leg part of the boot.
In the 1880s, the Women’s Christian Temperance Union (WCTU) started working towards promoting abstinence through education to rid society of the ill effects of excessive alcohol consumption.
While at the time a national prohibition was not passed, in several states and counties, alcohol consumption was banned through the passage of local laws.
At the time, the leg of the boot was used to conceal an alcohol bottle or flask and moved across state lines. Thus illegal movement of alcohol came to be known as bootlegging.
The term was extended to music in the 1950s when it became common to copy music without paying the artist.