After deliberating for 19 hours over whether Mohiussunnath Chowdhury was guilty of preparing an act of terrorism, the jury was discharged after failing to agree on a verdict.
Mrs Justice Cheema-Grubb had previously told jurors that they could make a decision by majority.
But a minimum of 10 people could not arrive at a verdict.
Prosecutors told London's Old Bailey that Mr Chowdhury attempted a terror attack outside Buckingham Palace because of “hatred” for the Queen.
After an apparent satnav error, the 27-year-old allegedly drove from his home in Luton to a pub called the Windsor Castle, before travelling onwards to Buckingham Palace.
Prosecutor Tim Cray said the Uber driver was going towards the world-famous landmark shortly before 8.30pm on 25 August when a marked police van came in the other direction.
Then he "swerved his car through the traffic cones designed to keep the two lanes of traffic apart."
Two officers got out to investigate, initially thinking the driver was drunk or on drugs, but Mr Cray said Mr Chowdhury “had something far more serious in mind”.
Police officers stand guard at a police cordon next to Buckingham Palace following an incident on 25 August
(PA)
He told the court: "It was down to the quick reactions of the police the defendant was stopped. As officers got out of the car, they heard the defendant say words to the effect 'It's all a bit f***ed up'.
"They then saw him reach for something that turned out to be a sword. There was a short, desperate struggle with the officers trying to get the sword off the defendant while he is punching at them and they are punching at him.
"The defendant is shouting 'Allahu Akbar' over and over again so by now the police officers understandably believed they were dealing with a terrorist incident."
PC Ian Midgley and Detective Sergeant Gavin Hutt suffered cuts as they disarmed the man, jurors were told. Footage captured them subduing him with CS gas.
Prosecutors presented a letter allegedly sent by Mr Chowdhury to his sister earlier the same day, which they said showed his intention to become a martyr.
UK news in picturesShow all 50 UK news in pictures 3 December 2020 The finishing touches are put to a 40ft Christmas Tree at Somerset House in London
PA
UK news in pictures 2 December 2020 A swimmer takes to the water at Serpentine Swimming Club after the second national lockdown ends in England. A strengthened tiered system of restrictions has been introduced
PA
UK news in pictures 1 December 2020 Artic Fox, Flo, investigates a stocking of treats in her enclosure as part of a Christmas enrichment programme at the wildlife conservation charity Wildwood Trust in Herne Bay, Kent
PA
UK news in pictures 30 November 2020 A man carrying a Christmas tree walks past a mural depicting a Saltire design in Leith, Edinburgh on St Andrew's Day
PA
UK news in pictures 29 November 2020 Wolverhampton Wanderers’ Leander Dendoncker warms up before the Premier League match against Arsenal at the Emirates Stadium, London
PA
UK news in pictures 28 November 2020 Police officers wearing a protective face coverings speak with a protester during an anti-lockdown protest against government restrictions designed to control or mitigate the spread of the novel coronavirus, on Regents Street in London
AFP via Getty
UK news in pictures 27 November 2020 Protesters from Peta animal rights group demonstrates against fox hunting in Westminster
PA
UK news in pictures 26 November 2020 A billboard displays a Manchester City Council message about the city's Covid alert level
AFP via Getty
UK news in pictures 25 November 2020 Chancellor Rishi Sunak visits the Imperial Clinic Research Facility at Hammersmith Hospital in London
Getty
UK news in pictures 24 November 2020 Freight lorries queueing along the M20 in Kent waiting to access the Eurotunnel terminal in Folkestone
PA
UK news in pictures 23 November 2020 A palette of changing colours as the sky lights up before sunrise at St Mary's Lighthouse in Whitley Bay, Tyne and Wear on the North East coast
PA
UK news in pictures 22 November 2020 Daniil Medvedev poses with trophy after winning the singles final during day eight of the ATP Finals at The O2 Arena, London
PA
UK news in pictures 21 November 2020 Members of the public walk through the city centre on the first day of tier four coronavirus restrictions in Stirling, Scotland. Over two million people in the West of Scotland are now living under the country's toughest level of coronavirus restrictions, following the rules coming into place at 18:00 yesterday seeing the closure of non-essential shops must close, as well as pubs, restaurants, hairdressers, gyms and visitor attractions
Getty Images
UK news in pictures 20 November 2020 The bronze statues of John and Cecil Moores, founders of the Littlewoods company, in Liverpool, with face masks on them as England continues a four week national lockdown to curb the spread of coronavirus
PA
UK news in pictures 19 November 2020 James Stunt arrives at Southwark Crown Court in London to give evidence in the trial of Justinas Ivaskevicius, 34, who is accused of stealing a 16.18-carat fancy yellow diamond from 38-year-old Stunt's substantial Belgravia mews
PA
UK news in pictures 18 November 2020
UK PARLIAMENT/AFP via Getty Imag
UK news in pictures 17 November 2020 People gather on the the Comedy Carpet in front of the Blackpool Tower waiting for the funeral cortege of entertainer Bobby Ball to pass on its way to Carleton Crematorium in Blackpool
PA
UK news in pictures 16 November 2020 Shipping companies and retailers have complained of delays in unloading arriving freight, with one ship told it could wait up to 10 days for a berthing slot
Getty
UK news in pictures 15 November 2020 Rainbow over Gwrych Castle in Abergele, North Wales, where the new series of I’m A Celebrity...Get Me Out Of Here! is taking place
PA
UK news in pictures 14 November 2020 Hindu monks set up Diya lamps at the BAPS Neasden Temple, London, on this morning of Diwali
BAPS Media
UK news in pictures 13 November 2020 Dominic Cummings, special advisor for Britain's Prime Minister Boris Johnson leaves 10 Downing Street
Reuters
UK news in pictures 12 November 2020 A surfer silhouetted against the waves at Tynemouth, near North Shields
PA
UK news in pictures 11 November 2020 People walk past the Tommy statue, officially named 1101, on Terrace Green by the seafront in Seaham, County Durham, on the anniversary of Armistice Day. Across the UK people fell silent in remembrance of the nation's war dead, as the coronavirus pandemic limits public commemorations
PA
UK news in pictures 10 November 2020 Number 10 special advisor Dominic Cummings waits to be admitted to 10 Downing Street in London
AFP via Getty
UK news in pictures 9 November 2020 A mural of the president of the United States, Donald Trump which has been painted on the side of Islington Mill arts hub in Salford, Manchester
PA
UK news in pictures 8 November 2020 Chelsea pensioners watch a Remembrance Sunday service from their windows at the Royal Hospital Chelsea
Reuters
UK news in pictures 7 November 2020 D-Day veteran Jim Healy, 95, from Manchester who is taking part in the Royal British Legion's doorstep silence for Remembrance. Jim was a Corporal in the Royal Marines and was coxswain of a landing craft assault on June 6, 1944 and will observe the Two Minutes Silence on Sunday by standing on his doorstep
PA
UK news in pictures 6 November 2020 The sunrises over woodland in Ashford, Kent
PA
UK news in pictures 5 November 2020 Two men walk over a nearly deserted Westminster Bridge, in foggy conditions, at the start of a four week national lockdown for England
PA
UK news in pictures 4 November 2020 Laura Martindale, manager of The Rocket public house in Whiston, pours away spoilt beer that has gone off after the pub was placed into tier three and now faces a four week lockdown ahead of a national lockdown for England
PA
UK news in pictures 3 November 2020 An oast house surrounded by autumn colours in the morning sunshine near Hawkhurst in Kent
PA
UK news in pictures 2 November 2020 Large waves crash over the harbour wall in Newhaven, East Sussex, during strong winds
PA
UK news in pictures 1 November 2020 Shoppers queue outside Ikea in Batley, West Yorkshire, after Boris Johnson announced a new national lockdown will come into force in England next week
PA
UK news in pictures 31 October 2020 Boris Johnson announces new restrictions in No 10
Getty
UK news in pictures 30 October 2020 The hallway of the Halloween house of Conor Pilkington (centre), 23, from Gateshead, Tyne and Wear, who has gone all out this year with his Halloween display. Conor has spent an extra £5000 to make it extra special due to the covid pandemic
PA
UK news in pictures 29 October 2020 Chief of Defence Staff General Sir Nick Carter (centre) joining members of all three armed services, in Waterloo Station, London, to support the Royal British Legions Poppy Appeal by collecting donations and selling poppies on London Poppy Day
PA
UK news in pictures 28 October 2020 Surfers take to high waves caused by Atlantic swells in Mullaghmore in Co Sligo
PA
UK news in pictures 27 October 2020 A rare giant Japanese spider crab is moved into the sale room during a preview of the forthcoming Evolution Sale at Summers Place Auctions, Billinghurst, West Sussex
PA
UK news in pictures Felixstowe Port Congested Amid Brexit Stockpiling And Pandemic Pressures
Getty
UK news in pictures 26 October 2020 A television crew prepare to do a live transmission opposite the Nave Andromeda, an oil tanker berthed at Southampton docks, southwest England. British soldiers yesterday boarded the tanker and detained seven suspects, the defence ministry said, after the crew were forced to take shelter from stowaways who threatened them
AFP via Getty
UK news in pictures 25 October 2020 Staff from British Divers Marine Life Rescue and Tynemouth Aquarium release three seal pups at St Mary’s Lighthouse in Whitley Bay. They were rescued after being found abandoned on the North East coast
PA
UK news in pictures 24 October 2020 Edinburgh University students protest against the false promise of 'hybrid learning' to new and returning students during the Covid-19 pandemic in Edinburgh, Scotland. The protest was organised to enable the students to show their anger and disappointment to the University of Edinburgh, after the students felt they were misled after they returned to find the vast majority of their lectures and contacts were all online
Getty Images
UK news in pictures 23 October 2020 The sun rises over the Severn crossing as traffic crosses from England into Wales, where a countrywide firebrake lockdown will begin from 6pm today until 12.01am on 9 November
PA
UK news in pictures 22 October 2020 EU chief Brexit negotiator Michel Barnier wearing an EU-flag themed face mask arriving at a conference centre in central London to attend a new round of trade talks with the UK
AFP via Getty
UK news in pictures 21 October 2020 The RRS Sir David Attenborough, the UK's most advanced polar research ship, passes The Royal Liver Building after leaving Cammell Laird shipyard, Birkenhead, Merseyside. The crew are scheduled to conduct 14 days of technical trials off the coast of North Wales before the the shipyard formally hands it over to the Natural Environment Research Council (NERC) and the British Antarctic Survey (BAS) crew for intensive training at Holyhead Port. The new polar ship will transform UK research in the polar regions and will be used on BAS missions which are critical for understanding and making sense of changing climate.
PA
UK news in pictures 20 October 2020 Prime Minister Boris Johnson outside Downing Street, ahead of a Cabinet meeting at the Foreign and Commonwealth Office
PA
UK news in pictures 19 October 2020 A man walks past a mosaic on a wall in Manchester
Reuters
UK news in pictures 18 October 2020 Cyclists cross a bridge over Flechs Water near to Brockenhurst in the New Forest
PA
UK news in pictures 17 Ocotber 2020 Pedestrians walk pas the Royal Seabank Hotel in Blackpool as Lancashire enters tier 3 of the government’s coronavirus alert system
Getty
UK news in pictures 16 October 2020 A person wearing a face mask is reflected in an art work entitled "A=V" by Ben Cullen Williams in Covent Garden, London
REUTERS
"Tell everyone that I love them and that they should struggle against the enemies of Allah with their lives and their property,” it said. "The Queen and her soldiers will all be in the hellfire they go to war with Muslims around the world and kill them without any mercy.
"They are the enemies that Allah tells us to fight. Please make dua [prayers] for me that Allah accepts my efforts.”
Luton native Mr Chowdhury, had denied preparing acts of terrorism and said he only intended to get killed by police.
He told the court he was upset at the British government's role in arming Saudi Arabia and felt responsible for the deaths of innocent people in Yemen .
Prosecutor Tim Cray indicated that the Crown Prosecution Service would seek a retrial and Mr Chowdhury was remanded in custody until his next hearing.
Additional reporting by PA