The world-renowned author described it as a particular privilege to be given the rare honour as a female writer.
Rowling, who is also marking two decades since the publication of the first book in her best-selling series, has been honoured for services to literature and philanthropy.
In a written statement released as she was decorated by the Duke of Cambridge, the 52-year-old said: “I’m deeply honoured and proud to be receiving this honour.
Feile organisers asked if they have warned Wolfe Tones about leading young people in pro-IRA chants
Larne FC suspends player John Herron after he was spotted on camera wearing ‘tiocfaidh ar la’ assault rifle top
Irish republican rebel band Wolfe Tones lead giant Belfast crowd in singing Up the Ra ‘on the same night as singing Give Peace a Chance’
Irish language group Kneecap accused of ‘grooming sectarian hatred’ with Feile mural
‘He needs to leave our club NOW!’ Strong reaction Larne FC’s John Herron being pictured in ‘tiocfaidh ar la’ gun top as club suspends him
“To be included in the distinguished and diversely talented company of the other Companions of Honour, especially as a female writer, is a particular privilege.”
Membership of the Order of the Companions of Honour, established in 1917 by George V, is a special award held by only 65 people at any one time, and recognises services of national importance.
Rowling, whose first name is Joanne, was awarded an OBE in 2001.
She has previously told how her famous boy wizard creation simply “fell” into her head years earlier while on a crowded train to London after a weekend flat-hunting with her then boyfriend in Manchester in 1990.
Sitting on the delayed train, she said she had “never been so excited about an idea before”.
Harry Potter was born, and on her return home that night, Rowling immediately began writing what would become the first book of the series - Harry Potter And The Philosopher’s Stone.
A prolific Twitter user with more than 10 million followers, she uses it to promote her charities, including Lumos, and also to speak out against Brexit and US President Donald Trump.
Composer and conductor Sir George Benjamin said he was “deeply honoured” to be knighted for services to music.
The 58-year-old said he had learned he and William share a love of Disney film Fantasia.
He said: “I told him that my love for music was started by seeing the film Fantasia when I was a little child. He (William) loves the film also.”
Sir George began composing music at the age of seven and made his debut at the BBC Proms when he was 20, going on to be professor of composition at King’s College London from 2001.
Double Paralympian Libby Clegg said her trip to the palace was more nerve-racking than competing on the world stage.
Speaking after the ceremony, the 27-year-old partially sighted Scottish runner said: “My heart has stopped racing. I think it is a little bit more nerve-racking (than competing), because there is nothing you can really do to prepare.”
Ms Clegg, who won two gold medals in Rio last year, described receiving her MBE for services to athletics and charity as “amazing”.
She said: “It’s just lovely to be here with so many people who have been recognised for so many different things.”
Also honoured was Rosemary Johnson, a former Welsh National Opera violinist who has been able to use her brain waves to perform music again despite being paralysed.
The 52-year-old, who was given an MBE for services to music, was left as a wheelchair user and unable to speak following a car accident almost 30 years ago.
She spent seven months in a coma and now lives at the Royal Hospital for Neuro-disability in south-west London where she receives 24-hour care.
Earlier this year she used her musical talent again through a special cap which allows her to “think music”, her aunt Anne Murnane said, describing being able to hear her niece playing as “lovely”.
She said: “A violinist who was in the orchestra with her years ago can play what Rosie is thinking.”
While she cannot speak in sentences Ms Johnson is able to make some sounds, Ms Murnane said.
“She understands absolutely everything you say. If you play a note on the piano, she can tell you exactly what it is, she has perfect pitch,” she explained.
The royal honour provided the family with a day of mixed emotions, Ms Murnane said.
The 80-year-old travelled from her home in the United States for the ceremony, which came little more than a year after Ms Johnson’s mother Mary died.
Ms Murnane, 80, said: “I am thinking all the time if her mother had been alive to see this day, and her father. It’s a happy, happy day but it’s a sad day too.”