Simulating phenomenological aspects of altered states of consciousness provides an important experimental tool for consciousness science and psychiatry. Here we describe the Hallucination Machine, which comprises a novel combination of two powerful technologies: deep convolutional neural networks (DCNNs) and panoramic videos of natural scenes, viewed immersively through a head-mounted display. The Hallucination Machine enables the simulation of visual hallucinatory experiences in a biologically plausible and ecologically valid way. We show that the system induces visual phenomenology qualitatively similar to classical psychedelics. The Hallucination Machine offers a valuable new technique for simulating altered phenomenology without directly altering the underlying neurophysiology.