Cooke was second quickest in the opening event of swimming and remained consistent in all five disciplines.
The 25-year-old finished strongly in the riding and combined event, while France's Valentin Belaud took gold.
"Our objective for Jamie was to secure Olympic qualification and we succeeded with that really well," said Pentathlon GB men's coach Marian Gheorghe.
Cooke won two World Cup wins earlier in the year prior to the World Championships in Moscow.
"To finish ninth in the World was an excellent achievement and Jamie should be very proud," Gheorge added.
"We now have two months before Rio where we can focus on final preparations. We want to build upon Jamie's recent form and performance today to give him the best chance of success at the Olympic Games."
Cooke's finish was the best individual GB performance of the week after Samantha Murray and Kate French finished 16th and 24th respectively in the Women's final on Friday.
The British team for the Olympics will be announced on 8 June.
Britain's Jamie Cooke secured his place at Rio 2016 by finishing ninth in the Modern Pentathlon World Championships.