A theoretical investigation is made to study the propagation of dust-acoustic solitary waves in a general and realistic self-gravitating dusty plasma system containing positively as well as negatively charged warm dust species and nonthermally distributed ion species. The standard reductive perturbation method is employed to derive the Korteweg–de Vries equation which admits the solitary wave solution. The parametric regimes for the existence of dust-acoustic solitary waves associated with electrostatic and self-gravitational potentials are obtained. It is shown that the population of nonthermal ion species significantly modifies the basic features of the dust-acoustic solitary waves. The significant effects of ratios of mass, temperature, and number density of positively charged dust species to those of negatively charged one on the basic properties (namely, phase speed, polarity, amplitude, and width) of the dust-acoustic solitary waves are also identified. A brief comparison between electrostatic and self-gravitational solitary potential structures is also made. The implications of our results to different space and laboratory dusty plasma environments, where opposite polarity dust grains are observed, are briefly discussed.