Simulations of structure formation in the Universe predict that galaxies are embedded in a `cosmic web', where most baryons reside as rarefied and highly ionized gas. This material has been studied for decades in absorption against background sources, but the sparseness of these inherently one-dimensional probes preclude direct constraints on the three-dimensional morphology of the underlying web. Here we report observations of a cosmic web filament in Lyman-α emission, discovered during a survey for cosmic gas fluorescently illuminated by bright quasars at redshift z~2.3. With a linear projected size of approximately 460 physical kiloparsecs, the Lyman-α emission surrounding the radio-quiet quasar UM287 extends well beyond the virial radius of any plausible associated dark-matter halo and therefore traces intergalactic gas. The estimated cold gas mass of the filament from the observed emission--about 1012.0+/-0.5/C1/2 solar masses, where C is the gas clumping factor--is more than ten times larger than what is typically found in cosmological simulations, suggesting that a population of intergalactic gas clumps with subkiloparsec sizes may be missing in current numerical models.