The Star Wars actor, whose likeness was used in the Mark Millar series, will play himself in the movie in what is likely to be a cameo role.
Millar wrote on Twitter: "I am so glad we got Mark Hamill to agree to be in Secret Service before he's whisked away for 6 years to wield a light-sabre again."
Kick-Ass director Matthew Vaughn is attached to the project and is said to have turned down the opportunity to helm X-Men: Days of Future Past to work on the film.
Hamill recently revealed that George Lucas told him of his play for further Star Wars films back in August, but it is yet to be confirmed whether the actor will be involved in the saga going forward.
A release date for The Secret Service is expected to be announced soon.