Okay, let me not be a kill joy like the rest of these guys and assume it can happen, what's the most likely way it can happen?.
Japan will have to either ally with the Portuguese or incorporate the naval capabilities of the Southern Coast Daiymos and Wakou pirates.
The best thing going for Japan in the Imjin war was their speed. While it did back fire in that they didn't completely eliminate the military capabilities of the region, they did rapidly overwhelm Korea. With a Navy shadowing them with Supplies, they can keep up that speed and make it to Beijing or the Yellow river in general in 3 months to 6 months, catching the Emperor by surprise. Whether they capture, kill or pursue him, it'll still be quite the blow for China.(Of course, the former two are preferable).
Now, in OTL the Korean Navy especially with Admiral Yi leading them was superior to the Japanese but butterflies removing Yi or Portuguese aid being sufficient to contain him and you have a naval supply line maintaining the speed of the Japanese.
However, the Chinese were able to defeat the Japanese, several times(I don't think they lost once) using a smaller army and in foreign but friendly territory (Korea). So I highly doubt they'll be able to defeat the Chinese in the field enough times, maybe if they got enough Steppe peoples as allies or foedorati they could defeat the Chinese in the field, consistently.
Finally, they'll need Chinese support but... it's not like the average successful warlord in any era in Chinese history started out with an army 100,000 strong. As long as they're able to maintain their position as top dog, ally with Chinese defectors and sinicize their dynasty, then this unlikely matter of events may just succeed.
The worst thing for Japan was also their speed. The rapid advance meant their supply lines could never keep up (they marched across 320 km in around 2 weeks, going from the southern coast to modern day Seoul), so guerilla fighters were going to harry their land-based supply lines endlessly. Which relates to the other major issue the Japanese had on land: all the guerillas they kept inspiring with their wanton brutality. The Japanese army slaughtered thousands of peasants (like Jinju, when the town wouldn't surrender). I've heard that that was due to the Japanese being more used to feudal warfare, wherein the conquered peasants would obey their new masters, and reacted poorly to the Korean peasantry fleeing the fields or taking up arms. In any case, the Japanese were drunk on success and too bloodthirsty to properly consolidate their holdings in Korea.
As for the steppe people, Nurhaci allegedly offered to help the Joseon after the Japanese sent an invasion into Jianzhou Jurchen lands. Not only did the Japanese disregard the Jurchen as allies and immediately proceeded to antagonize them upon entering their vicinity, the Jurchen were also too divided to pose a threat to anyone besides other Jurchens at this point. The Imjin War was a great opportunity for Nurhaci to take advantage of the Ming being too focused on Korea to intervene in his unification efforts. It was another 20 years of conquest and consolidation before Nurhaci was confident enough to openly oppose the Ming. In short, even if the Japanese managed to win over some Jurchens, the other Jurchen tribes would enter the fray to capitalize on their rivals being occupied in China. And intervening in Jurchen unification means the Japanese get even more bogged down on the mainland, sapping their momentum and allowing the Chinese to consolidate again.
As for defectors, it's the same issue with Korea. If they're doing well enough to seriously threaten the Chinese, they'll continue their blunt approach of conquest and slaughter without defectors. If they're doing poorly enough to try to woo defectors, they're not in a good spot to win. With the Qing, they spent decades paying off Ming commanders, setting up smuggling networks, marrying Chinese commanders to Manchu princesses, and getting Han Chinese commanders and advisors, which made the transition relatively seamless. They even maintained the Ming legal codes and local administrators. The armies that conquered China were majority Han Chinese. In contrast, the Japanese, based on their performance and actions in Korea, are more liable to try to subjugate everyone, set up the Japanese social system, and slaughter resistance, which, in Korea, bred even more resistance. The Japanese didn't have Koreans advising Toyotomi Hideyoshi, governing whole provinces with Korean legal codes maintained, or comprising major armies. What they did have a lot of were Korean noses and ears cut off of their victims, salted, and shipped back to Japan as trophies to be stored in shrines that still exist to this day.
And that's not even getting into the Japanese and their disunity. Konishi Yukinaga and Katō Kiyomasa hated each other for religious reasons and competed for glory rather than cooperate, Konishi Yukinaga hid important diplomatic information from Toyotomi Hideyoshi and tried to dupe him into making a peace without Hideyoshi's demands, and the rivalries that formed during the Imjin War erupted into another phase of civil war in Japan in the Battle of Sekigahara. The moment Toyotomi Hideyoshi died with a child for an heir, any chance of Japanese consolidation on the mainland was doomed. There were too many ambitious men back in Japan with armies and the men who wanted peace were old and dying off. If the Imjin War is successful, then Japan split up Korea between the daimyo loyal to the Toyotomi, forcing those daimyo to garrison Korea against guerillas, Jurchen raiders, Chinese forces, each other, etc. Which means Tokugawa Ieyasu has even more of an advantage marching on the Toyotomi and their contentious regent, Ishida Mitsunari, who managed to alienate such commanders as Katō Kiyomasa. Which means the Toyotomi-aligned forces in Korea are at war with the Tokugawa forces in Japan, which doesn't bode well for Japanese efforts on the mainland.
This is all also Toyotomi Japan, not Tokugawa Japan. Tokugawa Japan likely has an even tougher time trying to achieve any conquests, considering the bakufu never managed to win over the tozama daimyos. The tozama held that grudge for 200 years, culminating in the Boshin War.
In short, the Japanese were not as politically stable (succession stability, not prone to civil wars while gaining their initial foothold), active in courting defectors, or patient as the OTL conquerors of China. The Mongols and Manchu spent decades on conquering China, conquered it piecemeal, and got many, many defectors during the process. The Japanese were trying to blitz through Korea, got bogged down, slaughtered tens of thousands of peasants, and then proceeded to reignite their civil war within 2 years of their leader dying. The Imjin War is not comparable to the Mongol or Manchu conquests of China by any stretch, except maybe body count.