Being John Malkovich (1999)
Being John Malkovich is a 1999 American fantasy comedy-drama film, written by Charlie Kaufman and directed by Spike Jonze. It stars John Cusack, Cameron Diaz, and Catherine Keener, with John Malkovich playing a fictional version of himself. In the film, Cusack plays Craig Schwartz, a puppeteer who finds a portal that leads into Malkovich's mind.
More at Wikipedia.