In 1840 Merck returned to Hamburg to devote himself more and more to the public affairs of his native city. First, he took part in the establishment of the Hamburg-Bergedorf railway, the first railway line which was undertaken in north Germany. After the Great fire of Hamburg of May 1842, he joined as a Secretary in the then formed Technical Commission for reconstruction, which included British engineer William Lindley.