Superconductivity in topological materials, either at ambient or extreme conditions, has continued to intrigue scientists as a promising candidate for realizing topological superconductivity, a platform to host the long-sought Majorana fermions in condensed matter. The recent discovery of extremely large magnetoresistance (XMR) in the rare-earth monopnictides opens a new avenue to search for topologically nontrivial states therein, although contrasting opinions argue that it is the carrier compensation effect that is responsible for the observed large, nonsaturating magnetoresistance. Here we study the quantum oscillations and pressure-induced superconductivity in the topologically nontrivial candidate YBi. While the magnetotransport and quantum oscillations do reveal nearly compensated charge carriers, first-principles calculations clearly show that the electronic surface states manifest topologically nontrivial features. Upon applying external hydrostatic pressures, the magnetoresistance is found to decrease and at $P\ensuremath{\sim}2.5$ GPa, superconductivity emerges. There exists, however, a regime where XMR and superconductivity coexist in the phase diagram. YBi may therefore represent a rare system for studying the interplay between XMR, topological states, and superconductivity.