The ledger at Ningbo in 1854 was a bad ledger. Robert Hart, who had come out to China the year before at nineteen with the China Trade and then entered the British consular service, was posted in the port where the tide comes up the river past the city wall, and the record of the customs was kept in whatever books the local merchants had to hand. Ships arrived and departed and the paper said very little. The trade had been thrown into confusion by the Taiping rebellion, which had swept through the Yangzi valley and out of the treaty ports, and the foreign merchants at Shanghai, who were used to running their own affairs, had taken the collection of the maritime dues into their own hands. Hart did not invent the office he eventually ran. He inherited a mess. What he made of it was one of the more remarkable administrative achievements of the nineteenth century, and it was achieved by a man who was, in the eyes of the Qing government, a subject of a foreign power, and who was careful to remind everyone of exactly that fact for the whole of his career.
A Foreign Office Inside a Chinese State
The arrangement that Hart inherited was created in Shanghai. After the Taiping forces took the city in 1853, the British and American consuls at Shanghai took the collection of the customs into their own hands, on the argument that a government in extremity could not be expected to collect its own revenue. The arrangement that followed was, in form, a Chinese institution. The force of Chinese sovereignty was explicitly invoked: the new office was to be the Inspectorate of Chinese Maritime Customs, an agency of the Chinese government, with Chinese sovereignty proclaimed at its head, and the foreign consuls were careful in the instrument of 1854 to say so. In practice the head of the office was a foreigner, appointed by the consuls from among their own number, and the staff was drawn from both communities. Horatio Nelson Lay was the first Inspector General, and he held the post until 1863, when Hart took it over.
Hart was a very different proposition from Lay. Lay was an outsider with a Chinese name, a translator and a man of the world who had bought his way into the job. Hart was a professional. He had been born in 1835 at Portadown in County Armagh, in the north of Ireland, one of a family that had lost its land and its money, and he had learned his trade in a counting house rather than a school. He arrived in China in 1854, served four years in the consular service, resigned it in 1859 to join the Customs as deputy commissioner at Canton, was made officiating Inspector General in 1861 and Inspector General in 1863, and held the post for the next forty-eight years. In the standard biographical entries he is credited with an unusual combination of qualities: he learned Chinese, which few of his colleagues did; he married a Chinese woman, Chen Caifen, whose father was a Christian catechist from Ningbo; and he ran the largest revenue administration in the Qing state with an efficiency and an honesty that his contemporaries found almost incredible.
The argument about what the Customs actually was ran through Hart’s entire career, and he made it deliberately. To the Chinese officials he worked for, the Customs was the Qing government’s revenue department, and its officers were Chinese officials, however odd it might seem that a foreigner’s signature headed the returns. To the foreign merchants, and to the foreign governments that protected them, the Customs was a guarantee that the tariffs agreed in the treaties would actually be collected and would actually be shared out, and that Chinese officials could not be allowed to pocket the difference. Hart insisted on both. He ran the collection in Chinese, he employed Chinese staff at every level, he kept the books in Chinese and published the returns in Chinese and English, and he pointed out, in every memorandum he wrote, that the Customs was a servant of the Chinese government and not an instrument of the foreign community. When a foreign merchant complained to a consul that the Customs was too accommodating to Chinese officialdom, Hart’s reply was that a customs service administered by foreigners but answerable to nobody would be a foreign office and not a Chinese one, and that the whole legitimacy of the office rested on the fact that the Chinese flag flew over it.
The structure was peculiar and it was deliberate. The Inspector General was a foreigner, chosen by the consuls and approved by the Chinese government, and his conduct was reviewed annually by a board of the foreign consuls, who could censure him and who did so with a severity Hart found bruising and instructive. Under him stood Assistant Inspectors General, who were Chinese, and under them a large body of Chinese staff recruited from the port populations and trained on the job in a kind of college that the service ran in Shanghai. By the end of Hart’s career the Customs employed several thousand people, the overwhelming majority of them Chinese, and the Chinese officers holding the senior posts were drawn from a narrow and capable professional class recruited by examination who had spent their whole careers inside the service. When Aglen argued in the 1920s that the Chinese had no civil service capable of taking over the Customs, he was describing, in effect, a fact of which the Customs itself was the principal author.
That argument was not always won. There were periods in Hart’s long tenure when the office was, in practice, exactly what the merchants wanted: a foreign business with Chinese muscle. But the principle he asserted was the one that survived him, and it is the reason the Customs became what it became. A service that was notionally Chinese, that collected Chinese revenue, that was staffed in the main by Chinese officials who were recruited by examination, promoted by merit and salaried on a graded scale, and that reported to the Chinese Ministry of Finance through the Board of Customs, was in substance the first modern civil service in China. It was also, and this is the more remarkable fact, an accurate one. For a half century the customs returns were the only dependable statistics of the Chinese economy that anybody outside the Chinese government possessed, and they were published, year after year, in a form that any foreign merchant could use, and then used to argue with the Chinese government about the state of the trade.
His own account of the first years, and of what he thought the office was for, was published much later in These from the Land of Sinim, the essays he produced in 1901 after fifty years in China, and it remains the warmest thing he wrote. The biographical entries on him are unusually affectionate, and the standard reference accounts of the Chinese Maritime Customs Service and of Aglen, his successor, together with the reference entry on Sir Robert Hart, 1st Baronet, are the usual places to begin; Hart himself would probably have approved of the order of the entries, since he thought the Customs should always be understood before the man.
The Ledger, the Tide Table and the Lighthouse
What Hart built was not a tax office but an apparatus of measurement, and the measurement was the point. He compiled the tide registers for the Chinese coast, gathered the first systematic record of the silting of the Yangzi delta and the shoaling of the approaches to the treaty ports, published the sailing directions for the coast from Canton to the Gulf of Liaotung, and had the first Chinese coast lights and buoys established. He systematised the harbour and quarantine regulations. He insisted on a single set of weights and measures for the customs, which was an unglamorous and quite fundamental intervention in a country that had never had one. The statistical returns, which the service compiled from the declarations of merchants and published annually in a series that ran, unbroken, from the 1860s to the 1930s, became the spine of the study of Chinese trade and the yardstick against which every foreign claim about Chinese economic performance was eventually measured.
The quarantine service was the clearest case of what the Customs had taken on, and it began in 1873 at Amoy and Shanghai, when cholera was arriving with the ships and with the Chinese migrant workers travelling between the treaty ports and Southeast Asia. The rules that came out of it were drafted in Chinese, English and French so that the consuls of every maritime power could use them, and they were enforced by customs medical officers rather than by the territorial Chinese authorities. A vessel arriving from an infected port was required to anchor at a designated quarantine station and wait there to be inspected; it was forbidden to shift its berth, land a passenger, land a bag or land any article at all until a customs permit had been issued. Infection was signalled in the most literal way available to a shipmaster, a yellow flag hoisted at the foremast, and the vessel proceeded up the river that way, so that the news of a plague travelled ahead of the ship and every port downstream could prepare. The Customs was, in effect, running a public health system for the Chinese state before the Chinese state had one, and it was doing so with foreign medical officers under Chinese authority, which is precisely the paradox that made the institution so hard to defend and so hard to replace.
The output of the apparatus was nearly as important as the apparatus itself. Every year the statistical department compiled the returns of the trade and navigation of the ports open to foreign commerce, and the series ran unbroken from the 1860s into the 1930s. Every year it also printed a service list giving the names, ranks and posting of every official in the service, in Chinese and English. Every ten years the port commissioners produced a decennial report describing the trade, the industries, the hinterland and the conditions of their own port, and the run of them together is the most detailed running gazetteer of treaty-port China that exists. There were handbooks for the guidance of the staff and circulars for the bulletins that went out to the districts, and there was the semi-official correspondence in which the local commissioners discussed smuggling, the licensing of the hongs and the policing of the trade. Foreign merchants, consuls, missionaries and later Chinese officials all worked from the same material, and they worked from it because it was the only thing that was true.
The work reached inland. From the early 1860s Hart’s Inland Mission travelled up the Yangzi and the tributaries with a small party of Chinese assistants, establishing reporting stations and gathering the returns on the movement of goods that never touched a treaty port. That work was the practical core of a series of agreements with the Chinese government from the Chefoo Convention of 1876 onwards, by which the inland transit dues that had been strangling the interior were reduced and regulated, and by which the coordination of the maritime and the native customs was formalised. The Chinese Maritime Customs was, in effect, the hinge on which the whole apparatus of China’s commercial integration turned, and it was a hinge held by a foreigner.
Hart also used the Customs as an instrument of state-building in ways the Chinese had not asked for and did not entirely want. The service ran the imperial post from 1896, the modern Chinese postal system’s first organisation, based on the customs network. It paid for and supervised the Chinese Educational Mission to the United States from 1872, in which the boys were drawn from the customs service and its dependencies and were expected, on their return, to staff the maritime administration; the programme was a pet project of Hart’s and it is the clearest single example of his conviction that the Customs was not a foreign business but the embryo of a Chinese one. He proposed, and argued for over decades, that the way to modernise the Chinese administration was not to replace it but to make it better: better trained, better paid, better supervised, and answerable to a department that did the accounting properly. The Imperial Maritime Customs was, as one of its Chinese officers later put it, the only modern government department in China.
The Customs was also, in the treaty ports, the government. It issued the permits for the hongs and the banks to open, it regulated the loading and unloading of ships, it ran the harbour master’s office, it licensed the pilots, and it issued the permits under which foreign firms were allowed to operate in China at all. The whole legal scaffolding of the treaty-port economy stood on the Customs, and it did so in Chinese, for Chinese purposes, which is why the arrangement survived the intense hostility it generated. When the Chinese government wanted an instrument of its own in the ports, the obvious model was already sitting there, and in the 1930s it copied it: the customs district office, the Chinese commissioner, the Chinese staff on the Chinese payroll, doing the Chinese government’s work at the Chinese government’s expense.
The statistics were also a weapon, and Hart used them that way without embarrassment. He was an indefatigable correspondent with the British Foreign Office and with the commercial bodies at Shanghai and Hong Kong, and he had a way of arriving at a policy question through a column of figures. The question he returned to, for forty years, was what the Chinese government would be like if it were governed by a budget and not by a scramble for revenue, and whether a proper customs service was a first step towards that. His position on the opium question, on the administration of the treaty ports, on the reform of the likin and on the control of the salt monopoly all follow the same line, and in each case he argued that a Chinese government with accurate information about its own revenue would make better decisions about everything else. The “Handbooks” he compiled for the guidance of the staff were the internal encyclopaedia of the service; the “Circulars” were its bulletins; and both circulated in Chinese, which is part of the reason the Customs had a more intimate knowledge of the Chinese economy than any other foreign or Chinese body of the period.
The Chinese merchant community was another Hart creation, or at least a creature of his encouragement. The Shanghai Chamber of Commerce, founded in 1902 with Hart’s active support, gave the Chinese business class an institution that could speak to the foreign consuls and to the customs service in its own voice, and the Chinese commercial delegation that later went to Washington to argue the abolition of the unequal treaties was largely staffed by the same men. Hart pushed the chamber hard because he understood that the treaty-port economy could not be worked by foreigners indefinitely, and that the Chinese merchant class would have to become strong enough to take it over. He was explicit, in private, that the Chinese merchants in Shanghai were the most capable people he dealt with anywhere, and that the treaties would fall not because the foreign powers chose to give them up but because the Chinese had learned how to use the treaty port.
The Trouble at the Top
The suspicion came from the other end. To many Chinese officials, from the provincial governors upward, the Inspectorate was the most intrusive foreign institution in the empire, because it sat inside the customs house at every port with a monopoly of the government’s own revenue and reported directly to Peking. The wars of the 1880s and 1890s did not help. The Customs was on the side of the foreign merchants in the dispute over the transit dues and the inland navigation, and the Chinese public, when it wanted to express anger at foreign privilege, had a ready-made target. The criticism that Hart had to live with was not that he was crooked, or even that he was foreign; it was that the customs revenue was being taken out of the provinces, and that the whole apparatus was the instrument by which the treaty ports were being used to drain the interior.
The institutional attack came at the top. In 1906 the Chinese government created a Board of Customs above the Inspector General, with Chinese officials at its head, and the effect was to put Hart’s tenure on a Chinese official’s leash. British and American ministers protested that this was a breach of the treaty position, and Hart himself was, by all accounts, furious. The Chinese court’s view, as the British minister at Peking reported it, was that the Customs was an agency of the Chinese government and the Chinese government was not obliged to consult the foreign diplomatic corps about its own internal organisation. Hart went on leave in 1908 and did not return to the service, although his formal tenure ran on until 1911, when Francis Aglen took over from him. He was knighted in 1882 and made a Knight Grand Cross in 1889, and was made a baronet in 1893, and he received the Ancestral Rank of the First Class of the First Order for Three Generations from China, which permitted his descendants to wear the peacock’s feather. He had been decorated by the Order of Pius IX and by the Legion of Honour, and he was gazetted as a Chinese minister plenipotentiary in 1885, an honour he is said to have declined, since he was a servant of the government rather than its representative.
The Boxer uprising had put him in Peking in the summer of 1900, and he was there when the legations were besieged. The Boxer Protocol of 1901, which set the indemnity at 450 million taels, was negotiated in the months that followed, and the Customs was at the centre of the settlement in a way that has been consistently under-rated. Hart proposed that the customs revenue should be assigned as the security for the indemnity, and the arrangement was adopted: the Chinese government assigned the proceeds of the Inspectorate to the service of the indemnity, and the Customs became the collecting agent through which the instalments were actually paid to the foreign creditors. It is one of the great ironies of the subject that the foreign-run customs house, which Chinese reformers had spent twenty years denouncing as the drain, was the machine that made the indemnity payable at all. Hart was also appointed one of the Chinese plenipotentiaries at the Hague Peace Conference of 1907, where the claims of the Chinese government against Russia and the question of the Mongolian frontier were argued in front of the assembled powers.
Hart’s own papers burned with the legations. He had brought out the service’s records and little else, and he wrote afterwards with a bitterness his private correspondence does not conceal, describing the rising as the work of a society that had been allowed to grow in the shadow of a government too weak to police it. He lost his house, his library and twenty years of working notes in a single week of the summer of 1900. The claims arising from the rising were arbitrated in the years that followed, in a long and expensive process that settled very little in detail, and its real product was procedural rather than financial: a Chinese government could bring a claim against foreigners and be heard. Hart’s role in that process, as the official who had administered the revenue and knew the accounts, was to make the numbers work. It was the exact skill the British government wanted and the exact skill the Chinese government resented, and the episode is a fair summary of his career. He was on the side of good administration, and good administration was on the side of the treaty ports.
He was a vigorous partisan of Chinese interests in that room. The campaign of 1905 against American goods, which was the Chinese boycott of American imports that broke out over the restrictions on Chinese labour in the United States, was one of the first nationwide boycotts of the modern world, and it was pressed hard by the Chinese chamber of commerce. Hart intervened with a memorandum to the American government, arguing that the boycott would damage American trade far more than it damaged Chinese trade, and the United States Congress made it easier for Chinese workers to return. Whether the memorandum alone changed the policy is doubtful, but it was the sort of intervention that Hart made throughout his career, and it is why his private correspondence is one of the more valuable records of the period. When the Empress Dowager’s court issued an edict in 1908 commending the Customs and the Inspector General and confirming that the office should not be taken over by a Chinese bureau, Hart read it as a vindication. He had already left. He died on 20 September 1911, at Fingest Grove in Buckinghamshire, a few weeks after the empire he had served for fifty-eight years stopped existing, and he is buried at Fingest under a headstone carved with a Chinese-style inscription in English and Chinese.
The Aglen Memorandum
His successor was a very different animal. Sir Francis Aglen, a burly Norwegian in the British consular service who had come to China as an artillery officer, ran the Customs for sixteen years with an autocratic hand and no interest in the philosophical question of what the Customs was. He reorganised the service, extended the harbour and the engineering works, and presided over a period of great commercial expansion. He was also the man who produced the document that finally settled the argument about the Customs’s future, and he produced it in the wrong place and at the wrong moment, which is how it became famous.
The Aglen Memorandum of 1928 was addressed to the Chinese government, and it was published. It warned, in terms, that the Customs service was financially essential to the Chinese state, that the service’s staff were foreigners, and that handing the whole administration over to Chinese officials who had never been trained for it would produce a collapse of the revenue on which the government depended, and therefore a collapse of the government itself. The memorandum’s argument was that there was no Chinese civil service capable of taking over the work, and that the service could only be handed over gradually, over decades, as a Chinese cadre was trained to replace the foreigners within it.
Aglen inherited a China that was about to run out of money. The indemnity instalments, the war debt to Japan and to the European creditors, and the cost of the northern campaigns were all falling on a government whose revenue the Customs was still collecting and still guaranteeing, and the new government in Nanking had been formed in the same year as the Mukden incident, which cost it the northern customs districts and with them a good part of the revenue it had been counting on. The National Government’s problem in 1928 was not primarily a customs problem; it was that it had no secure revenue and no credit, and the customs revenue was the only large, reliable and predictable source of cash in the country. Aglen’s memorandum was therefore not read as a piece of foreign obstruction, which would have been easy to dismiss, but as a statement of fact from the only man who knew the numbers. That is what made it so damaging, and it is why the sentence that the Chinese government could not administer its own revenue without the foreigners lasted so much longer than the argument deserved.
It was received as an insult and it was read as a confession. That the foreign Inspector General could write so confidently about the incapacity of Chinese officials to administer China’s own revenue was precisely the point that made the memorandum so damaging, and it is the document that Chinese politicians cited for fifty years afterwards as the proof that the Customs had never really been a Chinese institution at all. But the memorandum was also the most accurate description ever written of what the handover would cost, because the sequence of events that followed bore it out. Chinese officials took over the district administration of the Customs progressively through the late 1920s and early 1930s, and the transition was slow, uneven and in places incompetent, and the revenue did wobble. The staff of the Customs, Chinese and foreign, scattered to the other ministries and to private commerce, and the generation of Chinese officials who came out of the service went with them. Whatever the Inspector General thought of Chinese capacity, the service had trained several thousand Chinese men and women to do the work, and when they left, they left with the customs house and took the practice with them.
The inland revenue was a second front in the same argument. The likin, the transit tax that the provincial administrations levied on goods moving through their territory, was the obstacle that had made the treaty-port economy impossible to integrate, and the Native Customs, the system of inland collection coordinated with the maritime service, was the answer that the Chefoo Convention and its successors had built. Abolishing the likin and transferring the inland collection to the central government was a fiscal revolution as well as an administrative one, and the Customs Service ran the machinery that made it possible. When the National Government abolished the likin in the early 1930s, it was doing so with an apparatus of measurement and a corps of trained officials that it had inherited almost entirely from Hart’s service. The transfer of power in the customs was in this sense the easy part; the transfer of the habits was the difficult one, and that was still being worked out when the war came.
The Long Handover
The formal instruments came out of the international negotiations of the late 1920s. The treaties of 1928 to 1930 restored Chinese tariff autonomy, which had been the object of a long campaign of Chinese revisionism and the subject of one of the best studies of Chinese economic history, Stanley Fowler Wright’s China’s Struggle for Tariff Autonomy, 1843-1938, in which the customs question is treated as the thread on which the whole fabric of the treaty system hung. A new national tariff, drawn up by Chinese officials and enacted by the National Government, came into force at the beginning of 1929, and the powers’ tariff treaties followed it through 1929 and 1930. The tariff was not a symbol: it was the moment at which the Chinese state acquired control of its own most important revenue, and the fact that the Customs had run that revenue accurately for seventy-five years is why the change could be made at all.
The service itself was reorganised in 1931 under the Ministry of Finance, the foreign Inspector General’s authority was progressively reduced as Chinese district commissioners took over, and the postal service, which had been run by the Customs since 1896, was separated out to become the independent national post. Frederick Maze, who had succeeded Aglen as Inspector General, remained the last foreign officer at the head of the service, and he stayed until 1941, when the Japanese occupation of the treaty ports and the seizure of the customs houses at Shanghai and elsewhere made the arrangement meaningless. The service continued to operate through the war under Japanese control, in a form that was deeply compromised and that the Chinese government never recognised, and after 1945 the rival Chinese authorities in Chongqing and in Peking both claimed it. It was in 1950 that the last foreign connections were finally wound up and the Customs, now known as the Chinese Customs, became an ordinary department of the government of the People’s Republic, with its staff, its files and its statistics intact.
The staff deserve a last word, because they are the part of the story that outlived the institution. Several thousand Chinese officials had passed through the Customs in the seventy-five years before the transfer, and when the service was wound up they went into the ministries of the central government, into the banks, into the chambers of commerce, into the revenue administrations of the provinces and into the customs services of other governments, where a good number found employment in the same work wearing a different hat. The Customs college in Shanghai turned out revenue officers for decades, and its graduates can be found in the administration of the Republic of China and of the People’s Republic, and in more than one foreign customs service, and they carried with them a professional habit that did not come from the foreigners: the idea that a tax office should be measured, audited and answerable to somebody who could be shown the figures. That habit is arguably the most durable export of the whole enterprise, and it outlived the argument about sovereignty by sixty years and counting.
The argument about the Customs has never entirely closed, and it closes differently depending on which country’s history you read it in. From the Chinese side the story is of a foreign institution that took over the revenue of a sovereign state, prevented the Chinese government from controlling its own finances, and turned the treaty ports into the instruments of a national humiliation; the Aglen Memorandum is the exhibit that discredits the defence. From the other side the story is of an institution that was, whatever its nominal sovereignty, the most effective arm of the Qing state, that produced the only reliable economic statistics in the history of the empire, that trained the cadre that staffed the twentieth-century Chinese civil service, and that made the fiscal basis of the modern Chinese state possible; the administrative groundwork of the late imperial state and the revolution that followed it are surveyed in John King Fairbank’s great history of modern China, which is one of the standard works on the question. Both readings are supported by the record, and they are supported by the same record, because the strange fact at the centre of this history is that Hart was right on both counts. The Customs really was the seed of the modern Chinese civil service, and it really was an imposition on Chinese sovereignty, and the only way to explain how both of those things can be true at once is to remember that Hart was running a Chinese agency with foreign hands, for Chinese purposes, and meant it.
References
- Sir Robert Hart, 1st Baronet — Wikipedia, the free encyclopedia, revised 2026
- Chinese Maritime Customs Service — Wikipedia, the free encyclopedia, revised 2026
- Francis Aglen — Wikipedia, the free encyclopedia, revised 2026
- Frederick Maze — Wikipedia, the free encyclopedia, revised 2026
- These from the Land of Sinim: Essays on the Chinese Question — Robert Hart, William Blackwood and Sons, London, 1901
- China’s Struggle for Tariff Autonomy, 1843-1938 — Stanley Fowler Wright, Harvard University Press, Cambridge, Massachusetts, 1978 (digitised copy)
- The Great Chinese Revolution, 1800-1985 — John King Fairbank, Harper and Row, New York, 1986
- Empire of Hygiene: The Quarantine Service of Chinese Maritime Customs 1873-1945 — Yuehtsen Juliette Chung, Working Paper 009, Institute of History, National Tsing Hua University, 2009
- China and the West: The Maritime Customs Service Archive from the Second Historical Archives of China — Gale Primary Sources, Cengage Learning, archive guide

