Strong-willed, widowed schoolteacher Anna Leonowens arrives in Bangkok from Wales with her young son Louis after being summoned to tutor the many children of King Mongkut. The two are introduced to the Kralahome, King Mongkut's confidante and Siam's prime minister. His severe countenance makes Louis apprehensive, but Anna refuses to be intimidated and convinces him to disguise his fear ("I Whistle a Happy Tune"). The Kralahome explains he has come to escort them to the Royal Palace where they will live – a violation of Anna's contract, which calls for them to live in a separate house outside the walls of the palace. Despite her threat to return to Singapore, Anna reluctantly disembarks with Louis and the Kralahome.

Once inside the Royal Palace, Anna demands to see King Mongkut and is allowed by the Kralahome to enter the Throne Room. A pleased Mongkut ignores her objections as he introduces her to his numerous wives – who include head wife Lady Thiang and a graceful girl from Burma named Tuptim. King Mongkut later presents the fifteen children she will tutor, aside from the other sixty-seven - among them his eldest son and heir Prince Chulalongkorn ("March of the Royal Siamese Children"). Anna eventually agrees to stay and tutor the King's children, prompting formality to break down. Later that night, Lady Thiang and the other wives assist Anna in unpacking while also interested in how the British dress and act. When an old photograph of her late husband Tom is discovered, the wives start to deride the unhappy Tuptim because she is in love with another man named Lun Tha, the same man who brought her to Siam. This causes Anna to reminisce about her life with Tom and give her blessing to other girls who are like she once was ("Hello Young Lovers").

Anna refuses to give up on the house and teaches the children about the virtues of home life to King Mongkut's irritation. The King contemplates how he craves truth and wonders why the world has become so complicated with different cultures saying different things ("A Puzzlement"). Meanwhile, Anna shows the children a modern map – saying that England is even smaller than Siam. Anna starts to form a relationship with the children as getting to know people is her favorite thing to teach ("Getting to Know You"). The lesson, however, creates disorder when the children refuse to believe in snow. The King eventually enters a chaotic schoolroom, ordering his pupils to believe Anna. Upon noticing Tuptim has a copy of the novel Uncle Tom's Cabin, he engages in a slightly heated conversation with Anna about slavery – an institution embraced by all his people.

That night, Anna is summoned to the King's private chambers where he says that after reading the Bible, he believes that the world was not created in six days, but after many centuries. The King disregards her explanation and orders her to take a letter to President Abraham Lincoln, in which he will send male elephants to America to help with the Civil War. He then forces her to sit on the floor due to an ancient custom that no one's head should be higher than his. She then continues to write the letter, but is left to finish the letter herself when she tries to explain that the elephants will not last long if only male elephants are sent. Anna goes outside, only to come across Lun Tha and learn that he has been meeting Tuptim in secret. He asks her to arrange a rendezvous and she refuses out of fear but eventually relents after remembering her past with her Tom. The lovers meet under the cover of darkness and Lun Tha promises he will one day return to Siam and they will escape together ("We Kiss In A Shadow").

The next day, King Mongkut becomes troubled by reports of English imperialism and bursts into the schoolroom after hearing Anna's pupils persist in singing "Home Sweet Home." Anna stands her ground, threatening to leave Siam despite pleas from the children. King Mongkut asserts that Anna is his servant only to see her repudiate the term and leave the room. King Mongkut then dismisses school and contemplates his next action. Lady Thiang visits Anna later that night and explains Mongkut is apprehensive over rumors that the British regard him as a barbaric leader, intending to turn Siam into a protectorate. Anna is shocked by the accusations but is reluctant to give him advice after their argument. Lady Thiang convinces her that the King is deserving of support and convinces Anna to go to the King ("Something Wonderful"). Anna learns the King is also anxious for reconciliation and learns that the British are sending an envoy to evaluate the situation in Bangkok. Upon learning that the envoy consists of Ambassador John Hay and her old lover Sir Edward Ramsay, Anna persuades the King to receive them in European style by hosting a banquet with European food and music – after which it is announced that the envoy is arriving in one week. The King assembles his family for a Buddhist prayer for the success of the venture and promises to give Anna a house of her own.

On the night of the banquet, The King has the wives wear lavish European-style gowns, but Anna discovers in horror they are not wearing undergarments. She entreats the women to keep their backs to the wall as Ambassador Hay enters the room. But the ladies flee the room in horror at the sight of the Ambassador's monocle, coming to the conclusion that he has an evil eye and the head of a goat on the matter of his beard. Ambassador Hay is diplomatic about the incident and follows the King into the Dining Room as Edward reminisces with Anna about old times in an attempt to bring her back to British society. The King however walks in on them dancing and irritably reminds them that dancing is for after dinner. After impressing the guests with his intellectual observations, the King presents Tuptim's version of Uncle Tom's Cabin – which is presented as a traditional Siamese ballet. However, the King and the Kralahome are not impressed as the play involves the issue of slavery and shows the slaveholding King dead after drowning in the river. By the time the audience calls for the play's author, Tuptim has left the room to meet with Lun Tha.

After the guests have departed, Anna talks with the King and is presented with one of his rings in appreciation of her efforts. He then explains he is not pleased with Tuptim and reveals she is missing. Anna however parries his inquiry by explaining she is unhappy because she is just another woman in his eyes. The King retorts that men are entitled to a plentitude of wives although women must remain faithful, explaining in a poem that men are "like honeybees" gathering honey from "blossoms," while "Blossoms must never fly from Bee to bee to bee". Anna explains the reality of one man loving only one woman and recalls her first dance before teaching the King how to dance the polka ("Shall We Dance"). But the touching moment is shattered when the Kralahome bursts into the room with news that Tuptim has been captured. For her dishonor, the King prepares to whip her despite Anna's pleas. She implies that he is a barbarian with no heart and that she will stay watch the King's actions. The King then crumples, puts his hand over his heart and runs out of the room. The Kralahome blames Anna for ruining him and now he can never be the king he was before. Tuptim meanwhile is led away in tears when she learns that Lun Tha is dead, his body discovered floating in the river. This causes Anna to return the ring, sever all ties as a governess and leave on the next boat from Siam.

On the night of her departure, Anna is prepared to leave Siam with Louis when Lady Thiang says that the King is dying. He refused to eat or sleep, isolating himself from everyone since the night of the banquet. Lady Thiang gives Anna an unfinished letter from the King that states his deep gratitude and respect for her, despite his harsh differences with her. This prompts her to go to his bedside in tears moments before their ship departs for Wales. The King gives Anna his ring, insisting that she wear it as she has always spoken the truth to him, persuading her and Louis to stay. King Mongkut then passes his title to Prince Chulalongkorn, who then issues a proclamation that brings an end to slavery and state that all subjects will no longer bow down to him. Satisfied that he is leaving his kingdom in capable hands, the King quietly dies with only Anna and the Kralahome noticing.

The musical was written for Gertrude Lawrence and her appearance in the film was contractually guaranteed. However, she was diagnosed with cancer while playing the role on Broadway and died during the run. Dinah Shore, a singer as well as an actress, was considered for the role of Anna in the movie. Maureen O'Hara, who had a pleasant soprano voice, was originally cast, but Richard Rodgers did not agree to the casting. It was Yul Brynner who pressed for Deborah Kerr to play the role. Marni Nixon provided Kerr's singing for the film. Nixon and Kerr worked side-by-side in the recording studio for songs which combined speaking and singing. Nixon also dubbed Kerr's singing again for the film An Affair to Remember.

Donald Bogle's biography of Dorothy Dandridge claims the Oscar-nominated African-American singer/actress was offered the role of Tuptim in partial fulfillment of her 3-picture contract with Twentieth Century-Fox, but Dandridge allowed Otto Preminger (her undercover boyfriend at the time) to talk her out of it because it was not the lead role. Rumors also circulated that Dorothy did not want to play a slave.

Rita Moreno, who was under contract to the studio producing the film, was invited merely for a test, but impressed the producers enough that she was selected for the part.[6] Moreno later stated in an interview that France Nuyen was also up for the part and believed Nuyen would get the part, but since Nuyen was not a contract player with Fox, she was not cast.

Three songs recorded for the film's soundtrack were never filmed and do not appear in the motion picture[7] (though three are on the soundtrack album: "Shall I Tell You What I Think of You?" "I Have Dreamed" and "My Lord and Master"). "I Have Dreamed" and another song that was not used in the film, "Western People Funny", survive in the released film only as orchestral underscoring. The first half of the "Song of the King" was turned into ordinary spoken dialogue, sung only some of the sung words, minus the king's opening lyrics, in the film, but survives as it was actually written on the soundtrack album. A special 50th Anniversary edition was released in 2006, which promised to restore the lost numbers, but it included only the audio for "Shall I Tell You?" This would seem to indicate no footage exists of these numbers. An off-screen choral reprise of "Something Wonderful" was added to serve as the film's finale (the play ends with musical underscoring, but no singing). None of the other reprises of the songs were retained in the film version.

The film was one of the only two films (the other being Carousel) shot in the then-new 55 mm CinemaScope 55 format. Although the promotion for the film made much of it being shot in CinemaScope 55, it was only released in the standard 35 mm CinemaScope format, with 4-channel stereo instead of the 6-channel stereo originally promised. CinemaScope 55 was never used or promoted again after this production.

The film was a huge success upon release, both critically and financially. However, due to the representation of King Mongkut of Siam, the film is banned in Thailand. Also, due to the changes with the replacement dialogue, as well as the onmission of the above mentioned songs, the film got some mixed reviews, too.

In 1961, it was re-released for the first time in a 70 mm format, under Fox's Grandeur 70 trademark.[8] For this release, the six-channel version of the stereo soundtrack was finally used. In 1966, it was re-released again,[8] this time in Cinemascope, before being sold to television in 1967.

As mentioned above, the film soundtrack album, first released on Capitol Records, restored three songs recorded for the film but not included in the final release print: "My Lord and Master", "I Have Dreamed", and "Shall I Tell You What I Think of You?". Added to the original LP and CD releases of the film was a seven minute overture not heard at the beginning of the film. The album was first issued only in mono in 1956, but, as with the Rodgers and Hammerstein films Oklahoma (1955) and Carousel (1956), the sound on the film had been recorded in what was then state-of-the-art stereo, which made it possible, with the advent of stereo on records, for Capitol to release a stereo version of the soundtrack album in 1958. As with Oklahoma! and Carousel, the record grooves of that time made it necessary for part of the album to be omitted in the stereo version, so half of Getting To Know You was cut in that edition, which included the instrumental section, and the other half of the children singing the other half of the song in the different key of music.

The film soundtrack album of The King and I was issued on CD first by Capitol and then by Angel Records. The first two editions of the CD were exact duplicates of the LP, but in 2001, as with the Oklahoma! and Carousel soundtracks, Angel issued a new, expanded edition of the album, which not only featured all the songs (including the ballet "The Small House of Uncle Thomas"), but some of the film's incidental music, as well as the original main title music. The Overture heard on the LP version and on the first two editions of the CD was included as a bonus track.

The soundtrack album was an instant success and continues to be a best seller to this day.

Preceded byOklahoma! by Original SoundtrackRock 'n' Roll Stage Show by Bill Haley & His CometsRock 'N' Roll by Elvis PresleyThis Is Sinatra! by Frank SinatraThis Is Sinatra! by Frank SinatraThis Is Sinatra! by Frank SinatraThis Is Sinatra! by Frank SinatraOklahoma! by Original SoundtrackThe Tommy Steele Story by Tommy SteeleLoving You (OST) by Elvis PresleyPal Joey by Original Soundtrack