On one of his exploits, when he was still a kshatriya, he and his soldiers took rest in the Ashram of Sage Vasishta. There his whole army was well fed and taken care of. This caused a doubt in the emperors mind as to how it was possible for this poor Sage to take care of all the arrangements to feed an entire army.
Upon questioning, he found that Sage Vasishta had in his possession a divine cow, by the name of Nandini. This cow could grant whatever its owner wished for. Seeing the cow, Viswamitra's greed took over him and he wanted to possess the cow. But Vasishta would not willingly give the cow away.
Angered thus, Viswamitra ordered his entire army to bring the cow by force. But Lo and Behold, a huge army ensued forth out of the cow and drew away the army of Viswamitra.
This angered Viswamitra so much that he wanted to defeat Sage Vasishta who was a Brahmarishi and take possession of the cow himeslf. It is very interesting to see all the challenges that Viswamitra faced in his life to become a Brahmarishi, before eventually giving up the greed to possess the cow.
Viswamitra has created his own version of Swarga, or Heaven, called Trisanku Swarga. When a proud King Trisanku asked his guru, Vasishta, to send him to heaven in his own body, the guru responded that the body cannot ascend to heaven.
King Trisanku then asked Vashista's seven sons to send him to heaven. The sons, outraged that Trisanku would come to them when the father had refused, cursed him to be a chandala, or untouchable. When Trisanku woke up the next day, he found himself entirely deformed. Since none of his subjects could recognize him, he was driven out of the kingdom.
He came across Sage Viswamitra, who agreed to help him. Viswamitra organized a great sacrifice and ritual propitating the Devas, pleading that they accept Trisanku in heaven. Not one Deva responded. Then Viswamitra, angered, used his magical power of penance and ordered Trisanku to rise to heaven. Miraculously, Trisanku rose into the sky until he reached heaven, where he was pushed back down by Indra.
The enraged Viswamitra commanded Trisanku to stop immediately, and again, he did so miraculously. The powerful Viswamitra then commenced creating another universe for Trisanku. He had only completed the heaven when Brahma ordered him to stop. Trisanku, however, did not enjoy Trisanku Swarga, he remained fixed in the sky and was transformed into a constellation.
Kousika is one of many gotras that consider Viswamitra as their root node.