The Shepherds were a mysterious alien race in the galaxy that dwelled within a wormhole. They were highly advanced and had links to dark matter which they were capable of manipulating to serve their goals. There were a rogue group of Shepherds that worked with the Romulan Star Empire to achieve their goals. (VOY novels: Cloak and Dagger, Shadow of Heaven)
The Shepherds came into existence shortly after the dark matter itself. After realizing the awesome power dark matter had in forming and shaping the universes, the Shepherds took it upon themselves in guarding the dark matter, making certain that all the universes stayed at the critical balance through the method the inhabitants of the universes regard as the Omega balance.
However some of the Shepherds believed that their constant interference in ensuring stability across all universes, was a perversion to the natural order. Led by Lhiau, the renegades sought to destabilize the balance, bringing excess dark matter into the universe forcing it to collide with another, thus bring creation to an end. They manipulated many worlds, including the Romulans offering them technology that would make them invisible to their enemies, but at a price it would allow mutated dark matter into the universe accelerating its death.
The mainstream Shepherds caught wind of this and enlisted the aid of the USS Voyager to set things right before the renegades plans came to fruition. However during a standoff between the two groups, it came to as a revelation that what the Shepherds were doing was a lie and that they were denying the universe to evolve naturally. The Shepherds then decided to isolated themselves into their realm, leaving the eventful death and evolution of the universe to fate. (VOY novels: Cloak and Dagger, Shadow of Heaven)
The Shepherds considered themselves to be maintainers of the balance of the universes, ensuring equilibrium. They had dealings with a similar omnipotent race such as the Q, but they regarded them as tricksters.