Precise Doppler measurements during 6 yr from the Lick and Keck observatories reveal two planets orbiting GJ 876 (M4V). The orbital fit yields companion masses of Msini=0.56 and 1.89 MJ, orbital periods of P=30.1 and 61.0 days, semimajor axes of a=0.13 and 0.21 AU, and eccentricities of e=0.28 and 0.10, respectively. The orbital periods are nearly in the ratio of 2:1, unprecedented among major planets but common among moons and asteroids. Moreover, the axes of the elliptical orbits appear to be nearly aligned. The inner companion was not recognized previously owing to the 2:1 ratio of periods, which allowed its signature to masquerade as added orbital eccentricity of the outer planet. Dynamical simulations show that the system is stable within a subset of the observed orbital parameters. The stability may be provided by a mean-motion resonance and the apparent alignment of the major axes. These planets pose unsolved questions about their formation and dynamical evolution, which brought them within 0.08 AU of each other and locked them in resonance. Based on observations obtained at the W. M. Keck Observatory, which is operated jointly by the University of California and the California Institute of Technology, and on observations obtained at the Lick Observatory which is operated by the University of California.