The Jahn-Teller effect, in which electronic configurations with energetically degenerate orbitals induce lattice distortions to lift this degeneracy, plays a key role in many symmetry-lowering crystal deformations1. Lattices of Jahn-Teller ions can induce a cooperative distortion, as exemplified by LaMnO3 (refs.2–4). While many examples occur in octahedrally5 or tetrahedrally6 coordinated transition metal oxides due to their high orbital degeneracy, this effect has yet to be manifested for square-planar coordination, as found in infinite-layer Cu (refs.7-9), Ni (refs.10–12), Fe (refs.13–15), and Mn oxides16. Here we synthesize single-crystal CaCoO2 thin films by topotactic reduction of the Brownmillerite CaCoO2.5 phase. We observe a dramatically distorted infinite-layer structure, with Angstrom-scale displacements of the cations from their high-symmetry positions. This can be understood to originate from the Jahn-Teller degeneracy of the dxz and dyz-orbitals in the d7 electronic configuration along with substantial ligand-transition metal mixing. A complex pattern of distortions arises in a 2√2× 2√2×1 tetragonal supercell, reflecting the competition between an ordered Jahn-Teller effect of the CoO2 sublattice, and geometric frustration of the associated displacements of the Ca sublattice. As a result of this competition, the CaCoO2 structure forms an extended two-in/two-out type of Co distortion following “ice rules”17.