The competition, which is part of the field competition, had to be interrupted for a short while when the horse seemed to have started to limp after hitting an obstacle on the more than 4 kilometer long obstacle course.
After a veterinary examination in the competition area, it was clear that the 14-year-old gelding had sustained serious injuries.
"Unfortunately, the X-rays showed incurable damage to the ligaments on the right hind leg, just above the hoof," the International Equestrian Federation (FEI) said in a statement.
"Did what he loved most"
The horse owners and the rider jointly made the decision to kill the horse.
23-year-old Godel competed in his first Olympics.
"Jet Set passed away while doing what he loved most - at full gallop and over obstacles," Godel writes on Instagram.
The terrain ride is one of three elements in the field competition, in addition to dressage and jumping.
It is always a great test of strength for horses and riders and it is not uncommon for horses to have to be killed.
At the World Championships in the USA, three years ago, Anna Freskgård's horse Box Quite trampled crookedly shortly before the finish line and was seriously injured.
The horse's life could not be saved.
The debate about safety in the field competition meant that the Olympic track in Tokyo was shortened somewhat.