Richard O'Dwyer, 24, was facing the prospect of being the first British citizen to be extradited for such an alleged copyright offence and his lawyers argued he would effectively become a "guinea pig" for copyright law in the US.
He will now travel to the US to complete the deal, pay a small sum in compensation and give undertakings not to infringe copyright laws again.
In return, he will avoid extradition, a trial and criminal record if found guilty.
The Sheffield Hallam University undergraduate's mother Julia, from Chesterfield, said the "fantastic news" was an "utter relief".
"I burst into tears when I read the judge's comments saying it was a very 'sensible outcome' and that 'it would be very nice for everyone if this was resolved happily before Christmas'," she told the Huffington Post UK.
She said there was now "loads to do".
"It's not a good time to be going to America, is it, on the run-up to Christmas?" she said laughing.
"We'll have to book flights. It's going to be panic stations.
"Obviously, we've got some work to do because we have to go to the US. We are still waiting for all the finer points to be agreed."
She said her son was at university and she would be attempting to email him.
O'Dwyer was facing extradition after allegedly earning thousands of pounds through advertising on the TVShack website, which helped people to watch films and TV shows for free, before it was closed down by the US authorities.
He could have faced jail if convicted of the allegations, which were brought following a crackdown by the US Immigration and Customs Enforcement agency.
But a judge at London's High Court was told O'Dwyer has signed a draft agreement in the last two days.
Edward Fitzgerald QC, for O'Dwyer, told the court he had agreed to a "deferred prosecution agreement" and intended to honour it.
Sir John Thomas, President of the Queen's Bench Division, said: "It is a very satisfactory outcome."
O'Dwyer is expected to travel to the US in the next 14 days to complete the agreement.
"It would be very nice for everyone if this was resolved happily before Christmas," the judge added.
The US authorities alleged that O'Dwyer received more than 230,000 US dollars (around £147,000) in advertising revenue since January 2008, until the site was shut down in 2010.
When he was arrested by City of London Police in November 2010, he accepted that he was earning approximately £15,000 per month from online advertisements.
Michael Caplan QC, an extradition lawyer at Kingsley Napley LLP, said: "To my knowledge, this is the first time this mechanism has been used in similar circumstances of extradition.
"Clearly this is good news for future defendants, needs the co-operation of prosecutors and has the benefit of cost savings."
He added: "The question now is will it set a precedent and will it open the door for discussions at an even earlier stage to avoid extradition."