The 24-year-old, racing the distance on the track for only the second time, obliterated the field to finish in 29 minutes 17.45 seconds, breaking the previous record by over 14 seconds.
Britain's Jo Pavey was 15th in her fifth Olympics at age 42, setting a season's best time of 31:33.44.
Kenya's Vivian Cheriot, the 2012 bronze medallist, finished second in 29:32.53.
Defending champion Tirunesh Dibaba of Ethiopia only managed third but in a personal best time of 29:42.56 - one of 18 personal bests in the race.
Ayana had recorded the fastest 10,000m debut in history at the Ethiopian Olympic trials in June
"I found it tough out there," said Pavey.
"I'm so honoured to have competed at my fifth Olympics, but in reality I am getting old. It was fairly humid. I would like to have been more competitive, but I gave my best and that is all I could do."
Ayana, the world champion at 5,000m, recorded the fastest 10,000m debut in history at the Ethiopian Olympic trials in June, clocking 30:07.00.
She becomes the first woman to break a 10,000m world record at an Olympic Games.
Britain's Jess Andrews finished one place behind Pavey in a PB of 31:35.92 and Beth Potter was 34th in 33:04.34.
Reaction to Ayana's world record
Paula Radcliffe, Marathon world record holder
"I'm not sure that I can understand that. When I saw the world record set in 1993, I couldn't believe what I was seeing. And Ayana has absolutely blitzed that time."
Brendan Foster, Olympic 10,000m bronze medallist and BBC athletics commentator
"You see things pushed along sometimes - you think of Bob Beamon in the long jump - but I'm not sure what to make of that to be honest. I will be interested to hear what Ayana has to say afterwards."
Steve Cram, Olympic 1500m silver medallist
"Unprecedented. Full stop."
source : BBc Sport