Ollie Carroll, five, suffers from the rare Batten disease and cannot stand by himself but managed to get to his feet to fling his arms around the prince.
Ollie's mother, Lucy, said both her son and the prince were "thrilled" to meet.
Ollie was among the children recognised at the WellChild Awards, which honour young children and their carers.
Several hundred youngsters, parents, carers and celebrity supporters attended the event, at London's Dorchester hotel.
The prince is patron of WellChild, which provides specialist care and support for chronically ill children.
Ollie, from Poynton, Cheshire, had received the inspirational child award for children aged between four and six.
His mother said she was not sure whether he knew who he was hugging or not, but said he had been instinctively drawn to Prince Harry.
"He was thrilled - they both were", Lucy said, adding that Prince Harry had been "very privileged".
She said Ollie could not stand up by himself but had "used his strength to stand up and hug him".
The prince told another child that his brother, the Duke of Cambridge, was "embarrassing all the time".
Jessica Davis, 10, received the young hero award for caring for her mother, Paula, who suffers from multiple sclerosis, and her autistic brother, also called William.
She gave the prince a drawing of himself and told him her brother was "really embarrassing".
She said: "He then said that Prince William was embarrassing all the time."
Prince Harry was also presented with a monkey made by eight-year-old Samuel Merrick, who has lung disease.
Meanwhile, three-year-old Oscar, whose mother Jill Evans was one of the winners of the special recognition award, asked Prince Harry whether he had "any giraffes in his garden".
The prince said he had been left "in awe at the strength of human character, particularly amongst those so young".
"Watching these children and young people face challenges with such determination, positivity and of course good humour, never fails to take my breath away," he added.
A young boy with a debilitating medical condition has hugged Prince Harry at a ceremony to recognise inspirational children.