The child was airlifted to hospital from the Braid River in Ballymena, County Antrim, after he fell into the water at about 1pm and was swept more than four miles down the fast-flowing river.
A large scale search operation was launched as emergency services looked to rescue the child.
The Community Rescue Service (CRS) said the boy was rescued more than 45 minutes after falling into the water.
In a statement, the Police Service of Northern Ireland (PSNI) said: "A young child pulled from the Braid River in Ballymena earlier today has passed away in hospital.
"The five-year-old boy fell into the water at around 1pm today.
"A major search and rescue operation was launched involving police, fire and rescue personnel and Community Rescue volunteers."
Inspector Shaf Ali said: "I would like to thank everyone involved in the search effort and extend my sincerest condolences to the family at this time."
CRS regional commander Sean McCarry said the child had been "swept away quite fast with it (the river)" and that "he was travelling quite a distance".
He said rescue workers were "running desperately" after the youngster as a police helicopter reported sightings of the child.