The Toffees have not announced the name of the opponents, but the match is scheduled to take place at Goodison Park this summer.
Osman, 32, made his debut for Everton back in 2003 and has played nearly 400 times for the Merseysiders.
"It's great news about the testimonial," he is quoted as saying by Sky Sports News.
"It's not something I was thinking about at the start of my career because 10 years seemed such a long way off back then, but it's nice to be honoured and I'm looking forward to it."
Osman has scored three goals in 36 appearances for Everton during the current campaign.