The 4400: In "Tiny Machines", based on Curtis Peck's description of tiny machines, Marco determines that the Marked place their consciousness in their hosts by using nanites. These nanites are injected into the spinal fluid and replicate until there are enough of them for the consciousness to take complete control over the host. Diana and Meghan are able to remove the Marked in control of Tom Baldwin by subjecting him to a lethal dose of polonium in order to destroy the nanites. Shawn is then able to heal him.* In Andromeda, High Guard ships of the line have nanomachines as part of their self-repair systems, their medical equipment and their anti-intruder defences. In the background information for the series (and sometimes alluded to on-screen) it's stated that nanomachines are ubiquitous in people as well as defense for nanomachine attacks. And Beka Valentine has them in her hair to make it change color.
Crusade had one episode where it turned out that the population of a dead world were wiped out by a Technomage-created nanovirus which caused them to become violently paranoid and delusional. Galen managed to shut them off by destroying their central control computer and they were reprogrammed as a temporary shield against the Drakh plague. And in the finale it turned out the Drakh plague was another nanovirus, without central control.
In "The Empty Child"/"The Doctor Dances", a type of these called "nanogenes" are responsible for the crisis at hand. They are Chula medical nanites that automatically detect and repair damage in living things. Unfortunately, the ones that "run amok" have never been exposed to a human before, and engage in Anatomically Ignorant Healing.
"Nightmare in Silver" introduces "Cybermites", nano-scale Cybermats that can partially cyber-convert a victim.
In Jake 2.0, an injection of nanomachines gave super strength, endurance and enhanced senses as well as the ability to interface with electronics.
Season eight of Mystery Science Theater 3000 introduced the Nanites, who could do anything from hairstyling to blowing up planets. However, they were usually too busy dealing with the social problems of their microscopic society to actually do anything useful.
Used in one episode of Now and Again in which the nanomachines used in Mr. Goodman's construction start spreading from his body, devouring all the ink in the world and destroying all literature. Turns out it was all just a dream.
The series featured a plot in "The New Breed" designed around nanobots created to heal human infirmities; the nanobots spontaneously develop an artificial intelligence and begin "repairing" what they perceived as "design flaws" of those human bodies - creating some rather weird things like an armored ribcage and even eyes in the back of the head! According to opening titles, the main plot was also based on Blood Music, mentioned under Literature.
In "Small Friends", Professor Gene Morton invented the Micro Electro Mechanical Systems (MEMS) while in prison. Controlled using a small keypad, the MEMS work together to perform numerous tasks. Hundreds of MEMS form a swarm, which resembles a firefly. Each swarm works with other swarms to maximize their productivity. Gene is forced by the psychotic prisoner Marlon to use the MEMS to break him out of prison.
One episode of Prey has the Homo Dominants design nanites that alter human DNA to turn anyone into a Dominant.
In a later season of Red Dwarf, the missing Red Dwarf was revealed to have been stolen and miniaturized (with the extra matter stored as a small planetoid) by nanobots that had once been Kryten's self-repair system. The nanobots are tracked down, and made to give back what they took as well as replace Lister's amputated arm. As a bonus, the nanobots had not only restored Holly when they originally took the ship, but when they rebuilt it they built it true to its original plans and resurrected the crew, minus Kochanski.
Revolution: The cause of the blackout. For as yet unknown reasons, electricity-draining nanomachines created by the Defense Department replicated out of control. Episode 13 had Rachel Matheson reveal their existence to Aaron Pittman. Episode 17 had Aaron reprogramming and using the blinking capsule Rachel got from her son's corpse in episode 11 and is actually first-generation nanotechnology to fix Rachel's broken leg. Episode 19 and the first season finale reveal that the Tower is not at all affected by the nanites, and the nanites end up being shut down.
The RoboCop: The Series, episode titled appropriately enough Nanno, focuses on the villian using nanotechnology as a weapon much to the annoyance of the kidnapped scientist that designed the little blighters. They infect Metronet to turn off all the alarms and make the governing computer (with a literal Ghost in the Machine) stop paying attention to running the city. By the end of the episode they rescue the scientist and he uses the machines to help out a officer suffering a spinal cord injury regain use of their limbs.
Nanites appear in several episodes of Stargate SG-1, although the earlier ones appear to be an evolution of a less-sophisticated group of Replicators which seem to have been independently created.note One of the more widely-accepted theories within Stargate fandom is that after the Ancients left the Pegasus Galaxy to return to the Milky Way (leaving the Asuran Replicators behind), one of them decided to go off on his own and restart the project, but with more control exerted over it to ensure that they didn't get out of control like the Asurans did. Unfortunately, things didn't quite go to plan.
Fanon and the Expanded Universe hold that the unsophisticated SG-1 Replicators encountered the advanced Stargate Atlantis Replicators at some point in the past or during the series and cribbed the ability to create human-form Replicators from them. However, canon explicitly states that the Milky Way replicators got the idea for human form from Reese:
First: When our Replicator brethren discovered the android Reese, they realized she was their creator. They studied her design and form and found aspects of her technology superior to their own. Second: Our brethren are composed of ungainly blocks. Third: We are composed of millions of cell units, microscopic in comparison, that combine to create this form.
Stargate Atlantis features a nanovirus that kills several members of the Atlantis Expedition and nearly kills many more during its first season (possibly Asuran nanobots). Nanotechnology is used fairly regularly in the later seasons, the most notable example being the human-form Replicators, originally designed by the Ancients.
The Goa'uld also had nanotech, one sytem lord used them to cause a group of humans to age and die quickly on the planet of the week as a way to see what they would evolve innto.
Star Trek: The Next Generation: When Nanomachines or "nanites" were first introduced, they wreaked havoc when accidentally allowed to interact with each other to form a Hive Mind. Interesting to note, these were originally dust mites. Later the nanites were put forth as a possible way of combating the Borg, though the process of destroying a Borg cube (estimated at about two weeks) would have taken too long to save the Federation. However, given the Borg's own mastery of nanotechnology as later seen in Star Trek: First Contact and in Star Trek: Voyager. It probably wouldn't have been very effective anyway. The Borg use "nanoprobes" for assimilating other species into their collective hive environment: the nanoprobes are injected into the bodies of other species through tubules, where they begin to transform the foreign species into partially organic and partially machine beings.
Star Trek: Voyager: One of the aforementioned Borg becomes part of the crew and in later episodes the nanoprobes are used to do various convenient things, including curing medical conditions, assimilating even more advanced technology and spawning a new individual, and so on.
The Borg's nanoprobes are also revisited during their appearance in Star Trek: Enterprise. Although the details behind their ability to assimilate a ship from the inside out had been previously left offscreen, it's revealed that the Borg simply inject the nanite tubules into a wall panel, causing a wave of Borg technology to begin spreading and consuming the ship.