A new form of life that arises spontaneously from the combined systems of the Enterprise-D, takes brief control of the ship and departs into space in Emergence.
The emergent lifeform appears in the Next Generation episode Emergence. In 2370 the Enterprise begins acting on its own, jumping to warp to escape a danger nobody had detected. The crew finds strange nodes linking the ship's systems into something resembling a neural network, with its centre in the holodeck.
There a mixture of programmes is running aboard the Orient Express, whose odd passengers act out the developing mind's impulses. The ship is using its own resources to build a new being in a cargo bay, and it needs a supply of vertion particles to finish.
When the first source runs dry and the lifeform begins to fail, Picard chooses to help rather than interfere. The crew creates the particles in a nebula, the completed entity leaves the ship and flies off, and the Enterprise returns to normal.