Prince Harry says the best teachers should go beyond academic lessons and teach about "resilience and compassion".
His comments accompanied the announcement of the top 10 shortlist for this year's Global Teacher Prize.
"We will all face setbacks and challenges," said Prince Harry, but teachers could help to prepare people for the "ups and downs" of later life.
The top 10 includes Raymond Chambers, who teaches computing in Corby.
"In addition to reading, writing and arithmetic, the very best teachers go beyond the pages of textbooks to teach young people about determination, aspiration, resilience and of course compassion," said Prince Harry.
He commended the achievements of the finalists of the Global Teacher Prize, run by the Varkey Foundation education charity.
His brother, Prince William, and Pope Francis sent video messages to last year's awards ceremony, where the prize was given to a Palestinian teacher, Hanan Al Hroub.
The prize, with an award of $1m (£810,000), is intended to raise the status of teaching and to recognise the impact of teachers on individual lives.
"We will all face setbacks and challenges in our lives, and our teachers play a vital role in preparing us for these ups and downs," said Prince Harry.Image caption Raymond Chambers is the UK's entry in the shortlist for the Global Teacher Prize
He said that teachers were there to help young people "often through turbulent times in their lives".
And he said: "I can certainly pinpoint those who had an impact on my life."
Mr Chambers, a computer science teacher from Brooke Weston Academy, Corby, Northamptonshire, is the only UK finalist in the top 10.
He is a previous winner of the UK's annual teaching "Oscars", in the category of outstanding use of technology.
He has won an "expert educator" award from Microsoft and runs a YouTube computer science channel, which has had 250,000 views.
He will be up against rivals from countries including China, Brazil, Kenya and Australia.
Sunny Varkey, founder of the Varkey Foundation, said he wanted the award to "shine a powerful spotlight on the incredible work teachers do all over the UK and throughout the world every day".
The 10 finalists for the Global Teacher Prize 2017 are:
- Raymond Chambers, computer science teacher from Brooke Weston Academy, Corby, Northamptonshire, UK
- Salima Begum, head teacher at Elementary College for Women Gilgit, Pakistan
- David Calle, from Madrid, Spain, the founder and creator of the Unicoos educational website
- Wemerson da Silva Nogueira, a science teacher at the Escola Antonio dos Santos Neves in Boa Esperanca, Brazil
- Marie-Christine Ghanbari Jahromi a physical education, maths and German teacher at Gesamtschule Gescher school, Germany
- Tracy-Ann Hall, an automotive technology teacher at Jonathan Grant High School in Spanish Town, Jamaica
- Maggie MacDonnell, a teacher at Ikusik School, Kativik School Board, Canada
- Ken Silburn, a science teacher at Casula High School, south-west Sydney, Australia
- Yang Boya, a psychology teacher at The Affiliated Middle School of Kunming Teachers College, China
- Michael Wamaya, a dance teacher from Mathare, Nairobi, Kenya