The nuclear receptor FXR is the sensor of physiological levels of enterohepatic bile acids, the end products of cholesterol catabolism. Here we report crystal structures of the FXR ligand binding domain in complex with coactivator peptide and two different bile acids. An unusual A/B ring juncture, a feature associated with bile acids and no other steroids, provides ligand discrimination and triggers a pi-cation switch that activates FXR. Helix 12, the activation function 2 of the receptor, adopts the agonist conformation and stabilizes coactivator peptide binding. FXR is able to interact simultaneously with two coactivator motifs, providing a mechanism for enhanced binding of coactivators through intermolecular contacts between their LXXLL sequences. These FXR complexes provide direct insights into the design of therapeutic bile acids for treatment of hyperlipidemia and cholestasis.