Boundary-induced phase transitions are one of the surprising phenomena appearing in nonequilibrium systems. These transitions have been found in driven systems, especially the asymmetric simple exclusion process. However, so far no direct observations of this phenomenon in real systems exists. Here we present evidence for the appearance of such a nonequilibrium phase transition in traffic flow occurring on highways in the vicinity of on- and off-ramps. Measurements on a German motorway close to Cologne show a first-order nonequilibrium phase transition between a free-flow phase and a congested phase. It is induced by the interplay of density waves (caused by an on-ramp) and a shock wave moving on the motorway. The full phase diagram, including the effect of off-ramps, is explored using computer simulations and suggests means to optimize the capacity of a traffic network.