I know there were the two opium wars in China, and there were attempts to update their armory that failed, but that is the extent of my knowledge. Was it inertia from the ruling class? Larger population and size? More widespread corruption? Inefficient bureaucracy?
There are, as ever, a number of ways of approaching this question. My breakdown here will not be absolutely exhaustive, but should offer a few perspectives that can be taken.
This is the standard view prevalent in popular understandings, and it is a very comprehensible one. The 'highlights' of the late Qing for most people are a series of military failures against Britain, France and Japan, and a decline in relative economic power. Historians working within the framework of Pomeranz's 'Great Divergence' thesis have suggested that there were structural factors, such as geographical scale, that worked against attempts at rapid economic expansion in the mid-nineteenth century; some military historians such as Tonio Andrade have pointed at failures to cultivate technical expertise or to consistently allocate finances as major causes of Qing military stagnancy. The former is not my area so I will not elaborate too much for fear of inaccuracy, but needless to say there have been explanations offered. However, I think it may be more fruitful to consider whether we are even approaching the topic in the right way. In particular, are we right in assuming either that China didn't undergo major changes in the 1860s, or that it should be expected to have done so?
Mary Clabaugh Wright's The Last Stand of Chinese Conservatism (1957) is rather outdated now, but at the time of its publication posited a bold thesis: during the reign of the Tongzhi Emperor (r. 1861-75), there was a deliberate and concerted effort by the Qing state to reassert old, 'Confucian' models in the face of domestic insurrection and foreign challenges, and a successful one at that. This period, which became retroactively known as the 'Tongzhi Restoration' (Tongzhi weixin), was one in which, according to Wright's argument, the Qing state clawed its way back from the breaking point that it had been stressed to during the Taiping War, and managed to re-establish a conservative Confucian consensus. However, Wright also argues that while there was a political and social Restoration, its inherently conservative character meant it was incompatible with economic and military 'modernisation'. Now, as noted, Clabaugh's book as a whole is very out of date with a lot of its more specific aspects having been superseded by modern scholarship, and many of its methodological assumptions were decisively challenged in Paul Cohen's Discovering History in China (1984). But it would be remiss not to consider such older perspectives on the question of 'why did Japan modernise, but not China?' Moreover, this focus on binaries of 'tradition' and 'modernity' underpins what is arguably a still-current perspective held by some.
Older scholarship (much of it influenced by the revolutionary politics of Sun Yat-Sen and to a lesser extent Mao) emphasised the Taiping as a social revolutionary movement, emphasising its agenda of land redistribution and at least nominal gender equality. More recently, emphasis has been placed on the 'modernising' agenda of the Taiping during their later years (c. 1860-64) at the time of the ascendancy of Hong Rengan, who thanks to his long period of residency in Hong Kong had developed an appreciation for the potential of Western technology and institutions – Stephen Platt, in Autumn in the Heavenly Kingdom (2012), has been a particularly strong proponent of this view of a 'modernising' Taiping. And the argument can go that a few contingent factors, such as a few particularly anti-Taiping officials in the British diplomatic corps and the simple uncertainties and randomness of war, saw the defeat of the Taiping and the survival of the Qing, and the consequent lack of a new, dynamic regime in China in the same way that there would be for Japan. Hypothetically, one could use a similar means to argue that the Meiji Restoration could have been thwarted had the Shogunate managed to put up a more effective defence during the early stages of the Boshin War in 1868. But if the inevitability of the Restoration can be called into question, then that raises another one.
Why are we assuming that China is the outlier here, and not Japan? Paul Cohen's Discovering History in China points out that assuming that societies confronted with imperialism will only act in response to imperialism, and that any prior internal conditions are irrelevant to that, is deeply questionable. Now, the way you have phrased your question does suggest, encouragingly, that you don't believe that overtly. But there still is the underlying assumption that Japan's response of radical change to its social, economic, political and military systems was what ought to happen in response to the rise of industrialised, imperialistic Western powers. But in many ways Japan seems like the exception in performing such a massive turnaround as to effectively become such a power itself. If we set aside our existing assumptions, the question 'Why couldn't China pull of Japan's modernisation programme?' seems a bit short-sighted, comparing the one notable success story of Japan to a single case of apparent failure seems misplaced. Rather, it seems the more viable question might be along the lines of 'Why did Japan respond to the threat of foreign imperialism in the nineteenth century by adopting the technology and institutions of foreign powers and doing so successfully, when China, Korea, Vietnam, Central Asia, and indigenous Africans, Australians and Pacific Islanders did not, broadly speaking?' And if we decide to stop thinking of Japan's response as the natural one, we can then turn to China again and ask, not why it didn't do what Japan did, but simply, what did it do?
In a basic sense, Wright was right: contemporaneously with Japan, processes of change happened in China as well. The issue is with framing it as a 'Restoration'. In fact, the Qing state by 1875 was far removed from what it had been in 1800, precisely because of the reforms carried out in the wake of the Taiping War, which had seen significant devolution of fiscal and military authority to officials in positions of principally provincial power, most notably Zeng Guofan but also his proteges, Zuo Zongtang and Li Hongzhang, who would be major figures in the Self-Strengthening Movement. The Qing devolved duties for tax collection, oversaw the establishment of modernised armies and navies under the personal control of prominent officials, and effectively 'orphaned' the provincial Manchu garrisons, consolidating institutions in Beijing to shore up Manchu status, but increasingly failing to effectively protect the interests of its original ruling caste. In effect, this period saw two parallel tendencies: one towards increasing provincial autonomy, and one towards increasing direct control of central government by the Qing court (at the expense of the existing metropolitan bureaucracy). These changes were not necessarily or even largely responses to the threat of imperialism, but rather primarily to the domestic circumstances of the Taiping War. And, as I've suggested before, that is perhaps what we ought to expect: the Taiping War was ultimately the most significant issue for the Qing during the 1850s-60s, not wars with Britain and France, and affairs in China were affected accordingly.
Obviously, detail has been a bit sparse, but I hope this has been a useful overview, and I am happy to answer further followups if you have them.