Set in Los Angeles, The End of Longing tells of "four broken people yearning for love".
Lindsey Posner will direct Perry's playwriting debut, reuniting them after previously working together in 2003 on the West End production of David Mamet's Sexual Perversity in Chicago.
It will run at the Playhouse Theatre from 2 February to 14 May.
Perry announced the new production in a video he posted on Twitter.
He said: "I've written a play called The End of Longing which I'm very excited about. I will also be starring in the play so I'm very narcissistic.
"It's about 12 years since I performed in a play in the West End so I'm very excited for my come back."
Talking about the upcoming production, Perry said: "Being on stage makes you feel naked.
"Being on stage in a play that I have written will make me feel doubly naked. So if you'd like to see me doubly naked, tickets go on sale today."
The actor told the Daily Mail the play - which he wrote in 10 days - was about "a drunk, a prostitute, a woman who's extremely neurotic and addicted to antidepressants, and a simpleton".
"When we meet them in a bar in Los Angeles, they're pretty severely broken, and they set off on a path to be less broken. Their path is bumpy and, hopefully, funny," he said.
Perry, who plays "the drunk", said the role was "sort of an exaggerated form of myself" but added it was not autobiographical.
Rehearsals will begin in January, although casting for the other roles have yet to be announced.
Friends star Matthew Perry is to return to London's West End stage to appear in a new play he has penned himself.