Neufeld was born in the German province of West Prussia as the son of a landowner and medical doctor. He studied medicine at the University of Leipzig, but finished his studies without a degree. From around 1880, he worked in Cairo, the capital of Egypt, which was an autonomous tributary state of the Ottoman Empire at the time. He was active first as a pharmacist and later as a merchant and married a British nurse named Emma Netherton, with whom he had a daughter. Due to his knowledge of English and Arabic, he took part as a translator in the Gordon Relief Expedition and afterwards continued his business in Aswan, Lower Nubia. Travelling with a trade caravan to Kordofan in western Sudan in 1887, he was captured by members of the Mahdist uprising. He spent the next 12 years, mostly in chains, in captivity in Omdurman, where he met the former Governor-General of Darfur, Rudolf Slatin and Comboni missionary Josef Ohrwalder, who were also imprisoned. In captivity, he converted to Islam and married an Abyssinian woman named Umm Shul, with whom he had two children. Neufeld was liberated by Anglo-Egyptian troops in the aftermath of the Battle of Omdurman in 1898 and subsequently returned to Germany.