Forty years ago, it was proposed that gas-phase organic chemistry in the interstellar medium can be initiated by the methyl cation CH3+, but so far it has not been observed outside the Solar System. Alternative routes involving processes on grain surfaces have been invoked. Here we report James Webb Space Telescope observations of CH3+ in a protoplanetary disk in the Orion star-forming region. We find that gas-phase organic chemistry is activated by ultraviolet irradiation.