What is the actual reason behind the Nine Tails attack? In the anime, the nine tails were summoned by Madara/Tobi during Naruto's birth and made to attack Konoha. Later Minato saved the village. For what reason the nine tails was made to attack Konoha?
Madara/Tobi had taken control of the Nine-Tails, but during his battle with Minato, Minato removed the Nine-Tails from the control of Tobi. Then Tobi escapes from the battle.

This is where the Nine-Tails was summoned by Madara/Tobi in Konoha (chapter 502):





This is when Minato removes the Nine-Tails from the control of Madara/Tobi (chapter 503):



This is when Madara/Tobi escapes:



Now, since no one was present to control the Nine-Tails, he went on a rampage and thus attacked the village. 

Initially, Madara/Tobi wanted to keep control of the Nine-Tails and use its power for himself, and destroy Konoha. But now the Nine-Tails was a loose canon destroying Konoha on its own free will.


   After Rin, who was someone very special to Obito, was killed, he was taken by hatred towards the Ninja world. Uchiha Madara had for long contained hatred for the Senju clan. After his defeat in the hands of the First Hokage - Hashirama Senju, had made the destruction of Konoha his vendetta. Madara saped into this hatred of Obito and toned Obito's thoughts to suit his own needs. When Madara/Tobi learned that Kushina is about to deliver a child, they made their move, as the time of delivering the child is when the seal is the weakest for a Jinchuruki. Having a Tailed Beast in his disposal would have been a great advantage for Madara, as he was already planning something that concerned the Bijuus.


Thus Madara/Tobi attacks Konoha, and in turn the Nine-Tails attacks Konoha.