"Can you bring Trump here?" he asked the audience, as he introduced a screening of his film The Libertine.
After receiving jeers from the crowd, he added: "You misunderstand completely. When was the last time an actor assassinated a president?"
"I want to clarify," he added, "I'm not an actor. I lie for a living [but] it's been a while. Maybe it's about time."
The star acknowledged that his comments - which may have been a reference to the assassination of President Abraham Lincoln by actor John Wilkes Booth in 1865 - would prove controversial.
"By the way, this is going to be in the press and it'll be horrible," he said. "It's just a question, I'm not insinuating anything."
He is not the first US celebrity to allude to killing the president.
At a rally in Washington DC, Madonna said she thought "an awful lot about blowing up the White House" and the US rapper Snoop Dogg shot a toy gun at a Donald Trump character in a music video.
But on social media, some have criticised Depp's comments - which come days after a gunman shot and injured Republican congressman and four others in Virginia in the US.
"Casual Johnny Depp: 'When was the last time an actor assassinated a President?' GOP reps targeted & shot days ago," tweeted one user, Chet Cannon, referring to the incident.
The US Secret Service is aware of Depp's comments, according to US media reports.
Festival-goers in Somerset met his comments about President Trump with laughter, albeit mixed with shock.
Depp - wearing distressed jeans and a black fedora - was mobbed by fans as he arrived at Worthy Farm.
Speaking to the BBC afterwards, one fan was more concerned with meeting her idol than analysing his politics.
"I don't even know what to say. I'm going to die," said Jess Gallagher. "He reached out and touched my hand and I don't know what to do.
"He's an amazing actor and I've loved him ever since I studied him in year 11 in A-Level drama. I can't cope!"
Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.
Actor Johnny Depp appeared to threaten US President Donald Trump during a speech at the Glastonbury Festival.