Meiji Democracy
Defeat stung. At no point did the Meiji oligarchs truly plan for victory over the Qing - their original understanding of the war was that the Qing would not get involved in Korea, similar to the failure of the Qing to get involved in the French acquisition of Cochinchina. However, internal Qing politics had radically shifted by 1873, leading to a disastrous war that Japan could not extricate itself easily from. The ploy of wooing the French into the war, as promising as it had seemed, had largely failed. In the end, Japan was forced to throw in the towel and withdraw its forces back to Japan, humiliated.
Although the oligarchs had enough troops left from the war to suppress any violent revolt - and there were indeed riots in several major Japanese cities in response to the humiliation, recriminations immediately took place between them. The samurai of the Tosa domain were largely blamed for this catastrophe, in particular Itagaki Taisuke. The defeat in Korea was largely used as an excuse by the Choshu and Satsuma oligarchs in an attempt to purge oligarchs from the Tosa clan. This proved to be a mistake. In response to widespread purges of their colleagues, several purged officials joined with angry unemployed samurai, outraged over their loss of status. Although the samurai class had not been officially abolished, all state stipends were abolished alongside the domains and most samurai excluded from the new Imperial Army, which had just been defeated in Korea.
Horrifying Itagaki, a samurai rebellion exploded in Saga Prefecture, eventually spreading across most of Kyushu, including the former Satsuma domain, where former Daimyo Shimazu Hisamitsu declared support for the rebels. Satsuma was almost immediately lost, much to the horror of the Satsuma oligarchs who saw their former lord declare against them. Much to the horror of the government, a separate rebellion exploded across Tohoku of disaffected former samurai of the pro-Shogunal forces. Their movement was otherwise largely similar to the Kyushu revolt, since the actual Tokugawa family had no interest in retaking power. Eventually, Itagaki declared for the rebels, hoping that he could steer the rebellion from the inside. Convincing the leaders of the rebellions to unify behind a demand, namely to establish a national assembly and a written constitution.
Morale in the Imperial Army was also exceedingly low, as many had felt they had been withdrawn from Korea despite not actually being defeated in a land battle. As a result, although Imperial forces were dispatched to put down the rebels, defection was common, and after a couple of bloody skirmishes, the two sides found themselves at a standstill. All parties involved were deeply aware that foreign powers were eyeing Japan eagerly, as diplomats from Britain, France, Russia, and the USA quickly asked both sides for additional concessions in return for assistance - the Japanese treasury was remarkably empty after the Korea catastrophe. Seeing that war would be treacherous and that their (former?) friend Itagaki moderated the rebel demands, the central government under Okubo Toshimichi threw in the towel again, agreeing to his demands. Both sides understood that the Imperial Army still had the ability to crush the rebels, but they judged the damage done to Japan would be incalculable. Most of the samurai armies went back to their homes, with the Imperial Army allowed to root out various holdouts who were clearly just into the rebellion as an excuse to loot.
Behind closed doors, a committee of oligarchs, chiefly Itagaki Taisuke, Okubo Toshimichi, Kido Takayoshi, and Okuma Shigenobu hammered out the new Constitution, primarily inspired by the French Constitution, but also with minor British and American influences.[1] Ito Hirobumi was rather alienated from the committee, viewing their proclivities as too liberal. Bowing to the demands of the rebels, the government was decentralized to some extent (in for example, taxation) and interestingly enough, a constitutional right to bear melee weapons was enshrined largely so samurai could keep their old swords. The powers of the Meiji Emperor were actually strengthened (both sides were ardent defenders of the Imperial system) to more or less run foreign policy at his whim and appoint anyone he liked from either house of Parliament. The new Japanese Parliament was split into the Imperial Assembly, elected first-past-the-post and a new House of Lords. The Assembly more or less only had the power of the purse - more complex lawmaking was placed in the hands of the House of Lords, comprised of the members of the new Kazoku nobility, which coincidentally included all the former daimyo and Meiji oligarchs.
If Meiji democracy created a conservative House of Lords, the Imperial Assembly was even more reactionary. The first Meiji elections returned an Assembly almost entirely comprised of major landlords, local village-heads, and notable samurai (primarily from formerly revolting areas). The conservatism of the system shocked, but delighted Ito Hirobumi, who switched immediately from being an opponent of Meiji Democracy to a vocal supporter. Although the rebellion was a humiliation to Japan, which quickly drew scorn from abroad, the system did successfully prevent any future samurai rebellions, welding the formerly angry class completely to the Japanese state.
With Japanese leaders sneering at the "culturally westernized Manchu barbarians", Japan quickly became both a bastion of Confucian scholarship, aligning itself abroad closely with Imperial Russia (which quickly grew to be the Qing's primary foreign enemy, alongsides Japan). Japanese universities would quickly become the leading centers of anti-Manchu sentiment in Asia, as Chinese students tried their best to sneak abroad and study in Japan.
---
[1] OTL, Okubo wanted a British-style system.