Harry, King Charles' younger son, is trying to overturn a decision by the Home Office - the ministry responsible for policing - which decided in February 2020 he would not automatically receive personal police security while in Britain.
Last year, the High Court in London ruled that decision was lawful, dismissed Harry's case, and refused him permission to challenge that ruling in a higher court.
The Duke of Sussex arrived smiling and waving for the two-day hearing in front of three senior appeal court judges, and listened intently as the case got underway in a packed courtroom.
Harry's lawyer Shaheed Fatima said the agency which protects royal and public figures had treated Harry on a "bespoke" basis not applied to anyone else.
"It means he has been singled out for different, unjustified and unfair treatment," she said, saying he was not seeking to be treated as he was when a working member of the royal family, but wanted to be considered on the same basis as others.
According to The Sun newspaper, Harry, 40, flew in from his home in California on Monday but it was not clear if he would be seeing any of his family from whom he has become estranged since his public criticism of his relatives and royal aides.
King Charles and Harry's stepmother Queen Camilla are currently on a state visit to Italy where they will be celebrating their 20th wedding anniversary.
Harry's trip also comes amid a high-profile, bitter dispute with the chief executive of his charity Sentebale, which he founded in honour of his late mother, Princess Diana.
Sophie Chandauka has accused him of bullying and racism, while Harry, who stepped down from his role at the charity, called what happened "heartbreaking".
At the outset of Tuesday's hearing, Geoffrey Vos, the second most senior judge in England and Wales, said some of the evidence could not be given in public, but he wanted as much as possible heard openly.
Harry, along with other senior royals, had received full publicly-funded security protection before he stepped back from his royal duties and moved to the US with his American wife Meghan in March 2020.
The Executive Committee for the Protection of Royalty and Public Figures, known as RAVEC, then decided Harry would no longer receive the same level of state-funded protection.
In its submission to the court, the government said his security would be based on the circumstances.
"The decision was not that (Harry) would under no circumstances be provided with Protective Security when in Great Britain," it said. "Rather, the decision was that, his position having materially changed, Protective Security would not be authorised on the same basis as before."
Harry's case against the government is one of a number of legal forays he has made in recent years, having taken action against a number of British newspapers over invasions of privacy and phone-hacking.