The 4400: Introduced as the way that people from the future take over human hosts (including protagonist Tom Baldwin) in the fourth season.
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.
Doctor Who: Nanomachines called "Nanogenes" ran amok to trigger the major crisis in the episodes "The Empty Child" and "The Doctor Dances".
Jake20: An injection of nanomachines also gave super strength, endurance and enhanced senses as well as the ability to interface with electronics in this short-lived show.
LOST: A common fanon explanation for the "smoke monster" is that it is a cloud of nanites. Though the writers have Jossed this theory more than once, it nonetheless appeared in the ARGThe Lost Experience.
Mystery Science Theater 3000: Season eight introduced the Nanites, who could do anything from hairstyling to blowing up planets. Lampooned because they were usually too busy dealing with the social problems of their microscopic society to actually do anything useful.
Now and Again: Used in one episode, 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.
Prey: One episode of this short-lived TV series has the Homo Dominants design nanites that alter human DNA to turn anyone into a Dominant.
Red Dwarf: In a later season, 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.
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). Also an example of criminal neglect from the Ancients . (To be fair, though, they thought they would be coming back, and couldn't really have foreseen the humans, who were still hunter-gatherers when they left, taking over. They weren't really jerks until they Ascended.) 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 palnet 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.
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.