Before Honolulu detective Charlie Chan leaves his boat upon arriving in Shanghai for his first visit in years, supposedly a vacation, a man stuffs a note in his pocket warning him not to leave the ship. At the docks, Chan is greeted by Sir Stanley Woodland's secretary, Philip Nash, and Sir Stanley's niece Diana, before he is surprised by his son Lee, who was sent by his firm to look into the trade situation there. At a banquet that evening in Chan's honor, as Sir Stanley opens a jade box supposedly containing a scroll for Chan, he is shot by a gun set to go off from inside the box. The box had been in Nash's possession all day. Later that night, a man sneaks into Chan's room and, with a silencer on his gun, shoots the figure in Chan's bed and escapes. Chan, fortunately, had slept on a sofa in his son's room and propped pillows to resemble his figure in the bed. The next day, when Chan calls for room service, the switchboard operator telephones Ivan Marloff to inform him that Chan is still alive. Chan next visits Diana and learns that during the previous evening, someone broke into her father's library and searched through his papers. Chan returns to his room where a man identifying himself as the chauffeur of Colonel Watkins, the chief of police, gives him a note instructing Chan to accompany the chauffeur. After Chan leaves, Lee, realizing the ruse, tries to follow his father, but he is subdued by a taxi driver and taken to the house where Chan is being interrogated by Marloff, who is hidden in darkness. Chan and Lee trick the gang into believing that the police have followed Lee, and through Lee's vigorous fisticuffs, manage to escape. Chan then visits James Andrews, a secret agent from Washington, and they discuss Sir Stanley, a secret agent of the British government who was cooperating with the opium committee of the League of Nations and officials in the Chinese government to round up a gang of smugglers who use Shanghai as a clearinghouse. While they talk, Nash, now Andrews' secretary, searches through his belongings. Noticing in a mirror a gun at the door, Chan ducks and avoids being shot. When Nash's fingerprints are found on the gun, he is arrested. In his room, Chan heats the back of a seemingly innocuous letter marked "important" from Sir Stanley to Andrews and discovers a message, which states that Sir Stanley has made an important discovery concerning Ivan Marloff. Chan suspects Andrews because Andrews earlier did not seem interested in the letter, but Andrews then arrives and shows Chan that he knows the secret method of communication. Chan and Andrews search the house where Chan was held, and Chan finds a stamp pad in the fireplace. They then go to police headquarters, where Diana arrives to see Nash, and after she slips him a gun, they escape. Chan returns to his room to find that Lee has trailed the taxi driver who earlier abducted him to a waterfront joint called the Versailles Café. Andrews calls Chan and says that he has cracked the case. When Chan arrives at Andrews' room, he sees Andrews beat a confession out of the chauffeur that Marloff is at the Versailles Café. Andrews leaves with Chan for the café, where, meanwhile, Nash asks Marloff to put him on a boat for America. Calling Nash's escape from jail a trick arranged by Chan, Marloff hits Nash and tells his men to drop him overboard once the boat sails. Upstairs, Chan and Andrews follow the taxi driver into a room where the gang waits hidden. After Chan discovers opium packets in a wine bottle, Andrews suggests that Chan go and signal the police to run the boat to the government dock. Chan delays leaving until the police, whom Lee has called, arrive and capture the gang after a shootout. Chan reveals that it was Andrews' valet who attempted to shoot Chan earlier and that Nash's fingerprints were put on the gun with the stamp pad because the gang felt Nash knew too much about Sir Stanley's investigation. Andrews offers to remove the crooks to his government's boats, but Chan pulls a gun on him and accuses him of being the real head of the gang. Nash had discovered through Sir Stanley's correspondence that the real Andrews neither smoked nor drank, yet the man posing as Andrews earlier accepted Chan's offer of scotch and cigarettes. Lee arrives with a wire photo of Andrews, who was killed three weeks earlier in San Francisco. Chan then sends Nash to comfort Diana. Although he was earlier annoyed that his son was always tying up the phone talking to a girl, Chan allows Lee one phone call to a female friend.