I recently discovered through an ancestry website conducted by my grandparents that I have an ancestor born in Amrum, North Frisian Islands, Germany in 1829 and died in Xiamen China in April 1864. Initially I had thought that since the Frisian peoples were noted sailors and Xiamen is a coastal city that he had likely died at sea. However, I also see that the Taiping Rebellion was occurring in China at this time. In my rudimentary reading I see that the rebellion had something to do with Christianity. My ancestors were certainly heavily Christian. Is it more likely he perished at sea? Or trying to spread Christianity in China? What other possible explanations are there? What did China look like during this time in it’s history? Why would a German man be in China during this time in history? Thank you!
Doing a little bit of rudimentary looking into Amrum, it seems that before 1864, the island was in fact part of the kingdom of Denmark. That's not to say your ancestor couldn't have identified as German, of course, but he most likely would have been born a subject of the Danish crown rather than of a German princely state.
As for why he might have ended up in China, without further information it's difficult to say. However, unless he was an ordained minister it seems unlikely he would have been there to spread Christianity. Passage to China did not come cheap, and with a few rare exceptions, missionaries needed to have financial backing which was usually only forthcoming from church organisations. One of the most notable early German missionaries in China, the Prussian Lutheran Karl Gützlaff, had originally been sent to Java by the Netherlands Missionary Society in 1826 before going independent a couple of years later and travelling to China; ultimately there would be very few Protestant German missionaries in China at all, though German missionaries of the Catholic Society of the Divine Word would be quite active in China after German unification in 1871.
Rather, it seems more likely that he would have been a merchant. Xiamen, also known by its Hokkien name of Amoy, was one of the four new 'treaty ports' opened at the end of the First Opium War in 1842, which made it legal for foreign merchants to trade there. Denmark never made a commercial treaty with the Qing Empire, but it was a beneficiary of other countries' treaties. So, Danish merchants would have been able to trade at treaty ports, and they also had a hand in the International Settlement in Shanghai. Even before the war, during the so-called 'Canton Period', there had been a Danish commercial presence in China – you can see this for instance on the Alexander Hume painting of the Canton factories depicting the Factories in 1772. These existing connections would have continued into the post-Opium War period, and so, in the absence of other information, it seems entirely plausible that your ancestor arrived in Xiamen on a Danish merchant ship.
For some context on the Taiping Civil War you can have a look at the various answers listed on my profile, but if you have any further questions do please ask!
Another small addition:
If your interest about this era has been piqued I would recommend the novel „Gott der Barbaren“ by Stephan Thome (here’s an English description of the book https://www.suhrkamp.de/buecher/god_of_the_barbarians-stephan_thome_42825.html?d_view=english - the author is known for well researched backgrounds).