During a high-speed motorboat chase with a criminal, Cheung Chau police officer Wong Tai Mui gets herself trapped in a waterspout, accidentally opening a time portal. She travels back 200 years to 19th century Hong Kong, a time when the island was under Qing rule. She encounters a family of Canton pirates, led by Cheng Yat, his wife Shek Giu, and their adopted son Cheung Po Tsai. Using her knowledge of the future, which she keeps in a smartphone, she saves the pirates from a deadly naval battle against the Qing naval fleet led by Prince Man Ho, the eleventh son of the Jiaqing Emperor. Puzzled by her mysterious origins, Cheng Yat and Shek Giu remain wary of Tai Mui and are hesitant in trusting her.
At Beijing's Imperial Palace, Imperial Consort Yim and Imperial Consort Shun manipulate Man Ho to get themselves into a position of a higher power. Jaded from politics and family feud, Man Ho decides to let go of his ambition for the crown and flees the palace.
On the day the tiangou covers the sun, another waterspout appears over the Canton sea. Cheung Po Tsai helps Tai Mui open the time portal so she can return to 21st century Hong Kong, but in doing so he also falls into the portal, traveling to the future with her.