Narong Roonthanawong, 39, was arrested under the country's controversial Computer Crimes Act after a legal complaint was made directly by the junta to police, officers said.
"He was charged with Computer Crime Act for uploading false information into the system," said Colonel Chairop Junnawat, superintendent of Chokchai police in northern Bangkok.
"He confessed that he shared an audio clip of a song which he thought was funny among his friends and he apologised to the prime minister for his inexperience," he added.
Prayut is something of a songwriter himself. He has composed two songs since coming to power, which are repeatedly played on radio and television.
Also Read
A notoriously mercurial figure, he is renowned for his somewhat zany sense of humour, often making off-the-cuff remarks and jokes.
But he has also displayed an explosive temper when it comes to personal criticism.
Since he seized power just under two years ago he has repeatedly clashed with reporters when pressed on his government's record, a trait he vowed to rein in during a New Year speech this month.
Critics say the wide-ranging Computer Crimes Act, which forbids disseminating digital information that "damages the country's security or causes a public panic", is often used to stamp down on dissent.
The number of computer crime, sedition and lese majeste charges have all shot up since the junta seized power in a May 2014 coup.
Prayut has also awarded himself powers to make any decision in the name of national security.