The 81-year-old Star Trek icon will present the long-running topical news quiz on Friday, May 25 at 9pm on BBC One.
Shatner will be joined by guest panellists Charlie Brooker and Andy Hamilton for the episode, the BBC confirmed in a statement.
"English sense of humour is different from American sense of humour. Luckily I'm Canadian," Shatner said of his appointment.
Alexander Armstrong will host the show for a record 20th time later this week on Friday, May 11 with Reginald D Hunter and Tory MP Nadine Dorries.
Alistair Campbell will make his presenting debut on June 1, with comedian Ross Noble and The Apprentice's Nick Hewer as guests.
The final episode of the current 43rd series will feature Kirsty Young as host for an 11th time with guests Victoria Coren and Inbetweeners star Greg Davies on Friday, June 8.
Regular captain Ian Hislop said last year that he would like former Prime Minister Tony Blair to appear on the programme.
William Shatner embarked on a one-man Broadway show titled Shatner's World: We Just Live In It earlier this year.