The analgesic utility of opioid-based drugs is limited by the life-threatening risk of respiratory depression. Opioid-induced respiratory depression (OIRD), mediated by the μ-opioid receptor (MOR), is characterized by a pronounced decrease in the frequency and regularity of the inspiratory rhythm, which originates from the medullary preBötzinger Complex (preB?tC). To unravel the cellular- and network-level consequences of MOR activation in the preBötC, MOR- expressing neurons were optogenetically identified and manipulated in transgenic mice in vitro and in vivo. Based on these results, a model of OIRD was developed in silico. We conclude that hyperpolarization of MOR-expressing preBötC neurons alone does not phenocopy OIRD. Instead, the effects of MOR activation are twofold: 1) pre-inspiratory spiking is reduced and 2) excitatory synaptic transmission is suppressed, thereby disrupting network-driven rhythmogenesis. These dual mechanisms of opioid action act together to make the normally robust inspiratory-rhythm-generating network particularly prone to collapse when challenged with exogenous opioids.