The film tells the story of Alibaba, a poor woodcutter, who becomes wealthy after finding a secret cave which contains various treasures and antiques. He resolves to keep his source of wealth a secret to lead a peaceful life. Whether he keeps it a secret and protects the treasure from falling into the wrong hands forms the rest of the story.
Marziana, a Baghdad-based dancer, is abducted by the tyrant Sher Khan, commander of the notorious king Amir Kasim Khan, to his palace. She is rescued by Alibaba, an impoverished woodcutter who fights with Sher Khan and vanquishes him. Marziana and her sidekick Dowlath find refuge in Alibaba's house who lives with his sister Ayisha and servant Bulbul. Marziana learns that they are the siblings of Kasim, who had driven them out at the instigation of his cruel wife Salima. Marziana and Alibaba later fall in love.
One day, when Alibaba goes to cut wood, he chances upon the cavernous hideout of Abu Hussain, the notorious leader of forty dacoits, and overhears the secret code to enter and exit the cave. After the dacoits leave, Alibaba uses the code word, enters the hideout, and takes some of the cave's wealth which he uses to help poor people nearby. Both Alibaba and Marziana become wealthy overnight.
Kasim becomes jealous when he hears about his brother's fortune, and wants to know the secret behind this. Under Salima's guidance, he invites Alibaba and his household for a feast. After cunningly obtaining the secret of the dacoits' cave, Kasim sentences Alibaba to death, falsely accusing him of attempted murder. Marziana pretends to heed Kasim's order. She declares that Alibaba has been unfaithful to her and he deserves this retribution. Taking a knife, Marziana acts as though she means to kill Alibaba, but instead cuts the ropes that bind his hands. A fight ensues between Alibaba and Kasim's thugs (during which Salima is accidentally killed), but Alibaba subdues them and escapes with his allies.
Kasim enters the cave and greedily starts collecting many treasures. He soon forgets the code word, and is left trapped. The dacoits arrive and kill him for entering their secret cave. Alibaba later visits the cave and is shocked to see his brother dead; he takes away the corpse. After Kasim's death is announced publicly, Alibaba is declared the new king of Baghdad and everyone rejoices. Meanwhile, the dacoits return to their cave and find that Kasim's corpse is missing. Realising that someone else has entered their cave, they start searching for the mystery person.
From the cobbler Gulam's assertion that the woodcutter Alibaba had become wealthy overnight, Abu Hussain realises that it is Alibaba who discovered the secret of his cave, but kills the cobbler afterwards. Having his men hide inside barrels, Abu Hussain comes to Alibaba's house disguised as an oil merchant seeking shelter for the night. However, Marziana overhears him whispering to his men, and realises his true identity. When she dances at a banquet Alibaba hosts in honour of the guest, Dowlath and Bulbul roll the barrels one by one into the swirling waters as per the plan. After Marziana tries unsuccessfully to stab the "oil merchant", she exposes him as Abu Hussain; Alibaba is shocked. This leads to a fight between the two men, which results in Abu Hussain kidnapping Marziana and fleeing to the cave. Alibaba chases him and reaches the cave where he kills Abu Hussain after an intense battle. After Alibaba rescues Marziana, they marry and continue to perform social work.Male actorsM. G. Ramachandran as AlibabaK. Sarangkapani as DowlathP. S. Veerappa as Abu HussainK. A. Thangavelu as GulamM. G. Chakrapani as Amir Kasim KhanNandaram as Sher KhanO. A. K. Thevar as HameedK. K. Soundar as AbdullahFemale actorsBhanumathi Ramakrishna as MarzianaM. N. Rajam as BulbulVidhyavathi as SalimaP. Sushila as AyishaWaheeda Rehman as a dancer in the song "Salaam Babu"Sayee Subbulakshmi as dancers in the song "Naama Aaduvadhum"
Alibabavum 40 Thirudargalum is based on the story "Ali Baba and the Forty Thieves" from One Thousand and One Nights. The film's story is credited to the Modern Theatres' Story Department. In addition to producing, T. R. Sundaram also directed the film. A. J. Dominic was signed as the film's art director, while W. R. Subba Rao, L. Balu, and Murasoli Maran were in charge of the cinematography, editing, and dialogues respectively. A. K. Chopra and K. N. Dhandayudapani Pillai were in charge of the choreography. Alibabavum 40 Thirudargalum became the second major Tamil film adaptation of the story of Ali Baba; the first was the 1941 film of the same name, starring N. S. Krishnan. While that version was a comedy, this one was more action-oriented.
M. G. Ramachandran was cast in the title role, this being the final film of his three-film contract with Modern Theatres, following Manthiri Kumari (1950) and Sarvadhikari (1951). He was paid ₹12,500 (equivalent to ₹1.0 million or US$16,000 in 2016) for acting in the film. The screenplay was written in a way that would suit his then "swashbucking" image, as opposed to the original story where Ali Baba was a "gullible simpleton". P. S. Veerappa was cast as Abu Hussain, the leader of the forty thieves. Padmini was initially given the role of the female lead Marziana, but she was replaced subsequently by Bhanumathi Ramakrishna. Bhanumathi liked the film, one of her earliest in Tamil, because she found the character a "go-getter". In her autobiography, Bhanumathi noted that after she heard the story, she considered her role to be much better than that in Missamma (1955), from which she was fired after filming only four reels, adding that after she accepted to work on this film, she got more acting offers from Tamil film producers.
Ramachandran's elder brother M. G. Chakrapani was cast in the role of Alibaba's elder brother Kassim. K. Sarangkapani was cast as Marziana's sidekick Dowlath, K. A. Thangavelu as the cobbler Gulam, M. N. Rajam as Alibaba's servant Bulbul, Vidhyavathi as Kassim's wife Salima, and Sushila as Alibaba's sister Ayisha. Nandaram, O. A. K. Thevar and K. K. Soundar played Sher Khan, Hameed and Abdullah respectively. Waheeda Rehman, who later became a leading actress in Hindi cinema, appeared as a dancer in the number "Salaam Babu", while the dancer duo Sayee Subbulakshmi appeared in the song "Naama Aaduvadhum".
Alibabavum 40 Thirudargalum was shot entirely on indoor sets, with the exception of a few horse riding sequences. For changes of scenes, irises and wipes were used which, according to Encyclopaedia of Indian Cinema by Ashish Rajadhyaksha and Paul Willemen, added a "sense of anachronism" to the film. It was also the first full-length Tamil colour film, shot in Gevacolor. Rajadhyaksha and Willemen claim it to be the first South Indian film in Gevacolor, despite the fact that the 1955 Tamil film Kanavaney Kankanda Deivam had a few sequences in Gevacolor. The scenes involving horses, which belonged to the Mysore Reserve Police, were shot at Mysore over ten days. The thieves' cave, designed by Dominic, was created at two locations — the exterior cave scenes with the horses were shot at Mysore, while the interior scenes were shot at Yercaud near Salem. Sundaram brought twenty horses from Mysore for the shoot at Yercaud. The jewels and gold coins featured in the film were actually clay painted in gold.
In one particular scene, Ramachandran objected to the dialogue where he had to swear in the name of Allah, as he was then associated with the rationalist Dravida Munnetra Kazhagam. He suggested that the dialogue be changed to swearing in the name of his mother, but was finally asked by the director to use the original dialogue. When only a song and a fight sequence were left to be finished, Ramachandran could not appear for the shoot, since he had another film to shoot for. As Sundaram was unwilling to wait for Ramachandran's return, those portions were eventually shot with Karadimuthu, who acted as a body double for Ramachandran. Alibabavum 40 Thirudargalum was processed at the Film Centre, Bombay (now Mumbai). The final length of the film was 16,789 feet (5,117 m).
Alibabavum 40 Thirudargalum is based on the story of Ali Baba from One Thousand and One Nights. Although the tale and costumes are middle eastern, Marziana, a Muslim, often refers to Yama, The Hindu god of death. Sri Lankan historian Sachi Sri Kantha noted that various Ramachandran films reflect the 1950s trend of films being "costume dramas" that focus on princes and folk heroes, citing Alibabavum 40 Thirudargalum as an example.
Ramachandran was an avid fan of action heroes like Errol Flynn, John Barrymore, and Douglas Fairbanks. Throughout the 1950s, he acted in films that justified his status as an action hero. Alibabavum 40 Thirudargalum portrayed him as a swashbuckling action hero who also has a Robin Hood-like agenda of serving the poor and the downtrodden with the treasure he finds in the cave.
Rajadhyaksha and Willemen, in Encyclopedia of Indian Cinema, compare it to Ramachandran's other films like Malaikkallan (1954) and Madurai Veeran (1956) as they are also Robin Hood-inspired, and because Bhanumathi plays a damsel in distress in them. The French website Jolpress compared it to Manthiri Kumari because both films feature Ramachandran as a Flynn-inspired hero.
The film's original soundtrack and score were composed by Susarla Dakshinamurthi, while the lyrics were written by A. Maruthakasi. T. R. Sundaram decided to use the same tunes set from the Hindi film Alibaba Aur 40 Chor (1954). Udumalai Narayana Kavi was offered to write the lyrics. He declined, saying that he would only write lyrics for fresh tunes and recommended Maruthakasi, who was finalised. The song "Azhagaana Ponnu Naan" is based on "Dekho Ji Shanti Nikla", "Masila Unmai Kathale" is based on "Ae Saba Unse Kah Jara" and "Chinnanjiru Chitte" is based on "Chalo Chalo Hum Babul Ke Tale", all from Alibaba Aur 40 Chor.
The dilruba in the songs were played by Shanmugham. "Azhagaana Ponnu Naan" is set in the Mayamalavagowla raga. The opening line of this song was later used in a song titled "Azhagana Ponnu Thaan" from Nenjirukkum Varai (2006). "Ullasa Ulagam" was later remixed by Pravin Mani and Vidyasagar in Jayamkondaan (2008). "Chinnanchiru Chitte" was remixed in Muruga (2007). Elements from the song were also used in "Andangkaka" from Anniyan (2005).
The songs received positive reviews with "Azhagaana Ponnu Naan", "Masila Unmai Kathale", and "Ullaasa Ulagam" becoming popular among the masses. Charulatha Mani, writing for The Hindu, called "Azhagaan Ponnu Naan" a "peppy" song. Rajalakshmi Sivalingam of The Hindu (Tamil) called "Masila Unmai Kathale", written by A. Maruthakasi, an immortal song.
Alibabavum 40 Thirudargalum was released on 14 January 1956, during the festive occasion of Thai Pongal. The film was a commercial success and ran for over 100 days in theatres. It became a "landmark" in Ramachandran's acting career, and set a "precedent for many buccaneer-style characters" he would portray in his later films. It was later dubbed in Telugu as Ali Baba 40 Dongalu. Alibabavum 40 Thirudargalum had a limited re-release on 14 April 2011, during the festive occasion of Puthandu (Tamil New Year) in Chennai.
Tamil film historian S. Theodore Baskaran wrote in his 1996 book The Eye of the Serpent, "The film's cast of M.G. Ramachandran as the swash-buckling Alibaba, Bhanumathi as the singing-heroine ... and Thangavelu as the comedian was the main factor contributing to its huge success." He also praised the performance of P. S. Veerappa, and said that another factor attributed to the film's success that it was the first full-length South Indian colour film. In Encyclopedia of Indian Cinema, Rajadhyaksha and Willemen said the film was remembered "mainly for MGR's swashbuckling stunts (it is one of the star's most characteristic 50s genre films), the elaborate group dances and Bhanumathi's very popular song-and-dance routines." Following Bhanumathi's death in 2005, S. R. Ashok Kumar of The Hindu wrote that the film showcased one of her "best known performances."
Dancer and writer Lakshmi Viswanathan, who saw the film during its original release in 1956 at the Chennai-based Chitra theatre, wrote for The Hindu 2012, "We children could not contain our excitement when the first colour film in Tamil ... was released in Chitra. We saw it again and again with the thrill that only children of those days could experience." Sachi Sri Kantha felt that the Gevacolor looked somewhat "washed out" and "inferior" to other colouring processes like Eastmancolor and versions of Fujicolor. He said the film succeeded with the Tamil masses because "it was a first time experience they could enjoy the [colour] in totality. This is because illiterate Tamil masses would have watched Hollywood movies produced in [colour] for entertainment. But, being illiterate, [the] majority wouldn't have comprehended the dialogues and songs in English." In 2015, Karan Bali wrote for Scroll.in that the film "blended melodious songs, exciting fighting scenes and a suspenseful climax", and praised Veerappa's performance as Abu Hussain. On Ramachandran's centenary in January 2017, Nivedita Mishra of Hindustan Times included his performance in Alibabavum 40 Thirudargalum in her list compiling "some of his most memorable performances".
Alibabavum 40 Thirudargalum was released on home video by Moser Baer in June 2010, and by Raj Video Vision in April 2012.
Alibabavum 40 Thirudargalum has been referenced in many films. Janagaraj's character in Rajadhi Raja (1989) sings a portion of "Ullasa Ulagam", before meeting with a fate similar to that of Thangavelu's character Gulam in Alibabavum 40 Thirudargalum. Goundamani and Sathyaraj's characters imitate the song "Maasila Unmai Kadhale" in Rickshaw Mama (1992). Vellaisamy (Vadivelu) and Pazhanisamy (Vivek) sing the beginning portion of "Ullasa Ulagam" in Pongalo Pongal (1997). In Baba (2002), the title character (Rajinikanth) and his friends see the clip where Alibaba closes the cave using the phrase "close sesame" after entering it using the words "open sesame". Actor Narayan has stated that his 2015 film Thiranthidu Seese was named after the dialogue of the same name spoken by Ramachandran in Alibabavum 40 Thirudargalum. In Thoppi (2015), the Minister for Hindu Religious and Charitable Endowments orders police inspector Kuzhanthaisamy to find a stolen film reel box; the film is Alibabavum 40 Thirudargalum.