The actor, 27, who played hapless Neville Longbottom in the movie series, told youngsters at Pudsey Grangefield School not to give up in the face of rejection.
The talk was organised by Into Film, an education organisation which aims to help young people learn and develop through movies.
Over two sessions, which also included students from Corpus Christi, Crawshaw Academy and Greenside Primary School, Matthew talked and answered questions about his career working in one of the world’s biggest film franchises.
He said: “Being an actor, like many things, requires a very thick skin because there is a lot of rejection. You just have to stick to your convictions.
“All you can do is be prepared and do your best. In an audition, you might not be what they want but it doesn’t mean your interpretation is any less valuable. It is not an objective decision.”
The students were also shown three clips of Matthew playing Longbottom at various stages in the series to show how the character had developed.
And the actor, who grew up in Horsforth, said he had no idea how much the character meant to people.
He said: “I recently got a letter from someone who had been bullied at school and it drove him to a very dark place. He said that seeing Neville in the films helped him get through it all.”
Speaking after the talk Matthew said: “It’s great to be back in Leeds because I don’t get to come back home as often as I’d like.
“It’s important to say that it doesn’t matter where you’re from, whether it be Pudsey, Yeadon or wherever, anyone can have a career in the film industry. Everyone sees actors on the red carpet and think the business is a closed shop.
“But actors are such a tiny part of the industry and there are so many more people that make films happen. All you have to do is look at the credits at the end of a film to see the huge variety of roles that can be done. ”
Student Lauren Waddell, 16, said: “It was really surreal. We were all a bit star-struck and nervous to ask questions at first. But he came across as such a warm person and we all quickly felt at ease.”