In June 2015, it was reported that Madhu Shalini was part of the film and had starting filming, while Sampath Raj was also added to the cast. Uma Riyaz Khan was signed for an "important role" and Kishore informed that had been selected for a "key role" in the film. But the crew later opted for Asha Sarath after watching her films. Koirala to play Kamal's wife in the movie. Initially, the makers were considering Bollywood actress Manisha While Prakash Raj was said to portray a drug dealer named Vital Rao, Trisha's role was Mallika, a police officer. Trisha and Prakash Raj were the first actors to be cast and reported to play the female lead and an important supporting role respectively. Kamal Haasan was reported to be play CK Dhiwakar, an Indian Revenue Service officer in Narcotics Control Bureau. Writer Suka was chosen to write the Tamil dialogues, while Abburi Ravi was assigned to work on the dialogues for the Telugu version. Sanu Varghese and Shan Mohammed were named as the cinematographer and editor, respectively, while Ghibran was recruited as the film's composer, working for a fourth successive Kamal Haasan film. He added that the film would be shot simultaneously and with the same cast and crew as Cheekati Rajyam in the Telugu language.
Pre-production Kamal Haasan announced that his next project, a bilingual thriller titled Thoonga Vanam in Tamil, would be directed by his former assistant Rajesh and produced by himself. The director consequently denied reports that he had a fall out with the rest of the team The film completed it's final schedule in July 2015 by canning a fight scene and montage shots, without the presence of Velraj, who had to prioritise his work as a cinematographer for another film, Paayum Puli. Amy Jackson finished work in the film in June 2015, after filming sequences alongside the other two lead actors. Scenes involving Samantha portraying Dhanush's wife were shot in May 2015, with the team recreating the effect of rainy backdrop in a studio in Chennai.
The first schedule involved Dhanush and Amy Jackson, with the former shaving his beard to appear as a teenager in the portions. It developed under the working title of VIP 2, and the team denied reports of it being titled Tea Kadai Raja, before settling on Thanga Magan. The team began production in March 2015 without a title, and the project remained untitled until October 2015, a month before the film's release. Ravikumar and Raadhika Sarathkumar were signed on to play Dhanush's parents in the film. Sathish was selected to play a supporting role, while K. During the same month, Samantha also joined the team, which reprised several crew members from the director's previous venture. In December 2014, actress Amy Jackson revealed via Twitter that she had been signed on to feature in the film. Initial reports suggested that the film would feature two lead actresses with Trisha and Anandhi speculated as being cast, though Velraj denied the claims. Together Ramesh and Raja plan to punish the culprits and set the record straight.Following the success of Velaiilla Pattadhari (2014), Dhanush and Velraj announced that they would work together for another project during October 2014, and stated the film would not be a sequel to their previous film.
In the meantime, the grief-stricken Ramesh meets another person named Raja (also Rajinikanth) in jail who looks exactly like him. Mahendran (the son of two of the industrialist's relatives). Sridevi is upset, and the ill-intentioned relatives start closing their net around her, forcing her to marry Y. Ramesh is dragged to court and is shortly framed for murder. The industrialist is murdered and Sridevi also sees Ramesh in her house that same night. The industrialist is happy about this development until he sees Ramesh cheating on his daughter. Ramesh and Sridevi (the industrialist's daughter) initially find themselves at loggerheads, but eventually fall in love with each other. Ramesh finds the culprit and keeps a tight leash on everything happening in the office, thereby earning the wrath of the industrialist's relatives. Ramesh (Rajinikanth) starts managing the office of an industrialist who strongly suspects his relatives to be looting him.