Director Sundar C and Vishal announced that they would work together on a project in January 2012, and it was revealed that Vishal would portray a triple role in the film. After denying reports that the female lead role was first offered to Shruti Haasan, Sundar C hinted that they were set to sign on Hansika Motwani, but her busy schedule left her unavailable to commit dates for the project. Titled Madha Gaja Raja' after Vishal's three characters, Karthika Nair eventually joined the team to portray the role during April 2012. The film subsequently began production in Chennai during early May 2012, with a song shot featuring Vishal and Santhanam alongside Sadha, who was revealed to be making a guest appearance in an item number. Sundar C then chose to shoot some further scenes with Sadha and make her appearance last longer than just for a song sequence. However soon after production began, Sundar C chose to alter the script, with the new version having Vishal portray only a single character, with two leading actresses instead of one. Disappointed with this development, Karthika Nair left the project stating that the role of the lead actress had been significantly diminished as result of the change of story. Taapsee Pannu signed on to replace Karthika, but soon afterwards left the project citing date clashes with her commitments for the promotional activity of her Hindi film. Varalaxmi Sarathkumar was consequently drafted in after working producers Gemini Film Circuit during their previous venture Podaa Podi (2012), while Anjali was selected for the main leading female role. Gayatri Rao joined the film's cast to portray Santhanam's love interest, while actors Nithin Sathya and Sadagoppan Ramesh were selected to portray Vishal's friends in the film. The team subsequently began another schedule with the new storyline in Palani during June 2012.
The team moved to Jaipur during August 2012 to complete another schedule, while Vishal revealed that the title now referred to the agitated state of Lord Ganesha rather than the names of his characters, stating that "Gaja Raja" could be literally translated as fury. During the particular schedule, Vishal suffered an injury when filming a fight scene and was forced to take a week's break from working. The film's shoot moved to Hyderabad during September 2012, with Arya joining the team's cast to shoot for a guest appearance. Arya had flown in from Chennai and completed his work on the film within a single day. The team planned to shoot a song sequence in China, but eventually flew to Australia to record the sequences. By October 2012, it was revealed that the film was complete and Sundar C was putting "finishing touches" to the project.
Promotional campaigns started for the film in November 2012, with an initial release date of 14 January 2013 announced by the producers, Gemini Film Circuit. However, Vishal's other film Samar (2013) had been long-delayed and also wanted to release on the same date, and the actor tried to ensure both films did not clash. As a result, Madha Gaja Raja was briefly put on hold until the release of Samar. The makers then suggested that the film would release on 26 January 2013, but Samar's success meant that they sought to avoid releasing the film, while Samar was still running in theatres. The failure of Mani Ratnam's Kadal (2013) affected Gemini Film Circuit's finances after the venture became a surprise failure at the box office, and distributors of Kadal wanted compensation before Madha Gaja Raja was released.
After nine months of little information about the project, the producers announced their intentions of releasing the film on 9 September 2013 to coincide with the festival of Ganesh Chaturthi. However the plans were put on hold after an Australian national, Santhanam, successfully appealed for a court injunction to stop the film's release in September 2013. He claimed that Gemini Film Circuit had agreed to pay him a sum of six million rupees for his services of providing production facilities during the team's schedule in Australia, but had failed to make the payment. Under financial restraints, Gemini Film Circuits had also sold on the film to Vishal's newly launched production studio, Vishal Film Factory, but failed to inform Vishal of the outstanding payment which had to be made to Santhanam. The High Court subsequently had put a stay order on the release of the film until the issue was sorted. Vishal then took up the responsibility in trying to release the film, and helped get it censored, but was unsuccessful in getting the film released. Vishal later disassociated from the film and Gemini Film Circuit acquired the film again from the actor, and revealed that they would release the film in due course.
The makers continued to announce more potential release dates throughout 2014, none of which materialised. Distributor P. T. Selvakumar contemplated purchasing the film's distributing rights and planned to release the film on 7 March 2014 but the idea was dropped. Similarly Vishal made further efforts to try and release the film after the success of his own productions, but failed in his attempts. Sundar C and Vishal subsequently moved on to finish and release another film together during the period of delay, Aambala (2015). After further months of deadlock, in October 2015, it was announced that Sri Obuleshwara Productions had secured the distribution rights for the Telugu dubbed version of the film. Subsequently, in November 2015, Vishal pledged that he would take action to release the film by December 2015. In February 2016, News Today announced that the film is scheduled for a March 2016 release., later it was postponed again by the producer. And finally its release confirmed on April 29 by Vishal himself on Twitter, but again it was postponed to May 13, 2016 due to Theri running successfully in theatres. Delayed Since May 13, 2016 & Not Yet Released .
The music of the film was composed by Vijay Antony collaborating with Vishal for second time after Vedi and with Sundar C for first time. Vishal has sung a song named "My Dear Loveru", which was released as a promotional track in December 2012.