A dervish is a Muslim of particular religious order. They are known for their worship rituals which require the dervish to spin very fast causing his clothing to fan out in a circle. The men wear large circular skirts to capitalize on this effect.
To call something a whirling dervish is to say that object or person resembles a spinning top or is wild in its movement. An object can also just be a dervish.
The term twirling dervish is technically correct, as a dervish could be described as twirling. However, most would consider this a misspelling.
Examples
The Vatican’s Cancelleria Palace hosted the traditional ceremony of Sufi whirling dervishes for the third time in its history on Wednesday. [World Bulletin]
Usually a whirling dervish of energy and conversation, Nancy Garfinkel paused for a moment when asked for her title as related to the lifelong learning program she oversees called Food For Thought : Lectures To Nourish Your Mind. [Baltimore Sun]
The opening ceremony in Glasgow in June featured lassies dressed as Tunnock’s teacakes, whirling like dervishes. [Financial Times]
As a performer, Karen O has been a force from the start, a dervish of spit beer and punk screech, capable of magnetizing a concert hall with just a raised arm. One of her favorite dance moves is to whip off a shoe and whirl it around her head. [NY Times]
From his standup comedy work to TV roles to talk show appearances to Oscar-caliber movies and performances on Broadway, Williams was a dervish of comedy — tossing off one-liners, biting asides and sidesplitting routines in a blizzard of accents, attitudes and goodhearted energy. [WFAE]