"I spend a lot of time in race cars, but this will be the first time I've been at the wheel of a NASCAR stock car," Hamilton, who is racing this weekend at the Turkish Grand Prix, said in a statement.
"Tony and I will have some fun with the swap and make sure we put on a good show."
Stewart added: "When you've been around competitive racing for as long as I have, you really look forward to new experiences. This car swap with Lewis is definitely one of those opportunities."
(Reporting by Alan Baldwin, editing by Ken Ferris)