Despite advances in treatments and improved survival, patients with pulmonary hypertension still experience poor exercise and functional capacity, which has a significant detrimental impact on their quality of life. The nitric oxide (NO)–soluble guanylate cyclase (sGC)–cyclic guanosine 3′,5′-monophosphate (cGMP) pathway has been shown to play an important role in cardiovascular physiology, especially in vasodilation and pulmonary vascular tone. The oral sGC stimulator riociguat has a dual mode of action on the NO–sGC–cGMP pathway: direct stimulation of sGC independent of NO and indirect simulation via sensitization of sGC to endogenous NO. Riociguat is now licensed in >50 countries worldwide, including in Europe, the USA, Canada, and Japan. Approval for the treatment of pulmonary arterial hypertension (PAH) was based on Phase III data from the PATENT studies, in which riociguat significantly improved exercise capacity, pulmonary vascular resistance, a range of secondary end points, and hemodynamic parameters in patients with symptomatic PAH. In the Phase III CHEST studies, riociguat consistently improved exercise capacity in patients with inoperable chronic thromboembolic pulmonary hypertension (CTEPH) or persistent/recurrent CTEPH after pulmonary endarterectomy and is now the only drug to be approved for this indication. Riociguat was well tolerated in long-term studies of PAH and CTEPH. This review describes the role of the NO–sGC–cGMP pathway in the pathophysiology of pulmonary hypertension, and reviews the clinical efficacy and safety of riociguat in patients with PAH and inoperable or persistent/recurrent CTEPH. Based on its demonstrated efficacy and established safety profile, riociguat is a promising treatment option for patients with PAH and CTEPH.