I saw a post on r/HistoryPorn showing Nicholas II on a state visit to Japan. I'm aware that the Russo-Japanese War took place some years after this, so I was surprised to read in the comments on why Nicholas was in Japan, and that "the Ōtsu incident" occured the way it did. The wiki doesn't go into why anyone in Japan would want to risk provoking Russia at this point in time.
The attack (wikipedia):
The assassination attempt occurred on 11 May [O.S. 29 April] 1891, while Nicholas was returning to Kyoto after a day trip to Lake Biwa in Ōtsu, Shiga Prefecture. He was attacked by Tsuda Sanzō (1855–1891), one of his escort policemen, who swung at the Tsesarevich's face with a saber. The quick action of Nicholas's cousin, Prince George of Greece and Denmark, who parried the second blow with his cane, saved his life. Tsuda then attempted to flee, but two rickshaw drivers in Nicholas's entourage chased him down and pulled him to the ground. Nicholas was left with a 9 centimeter long scar on the right side of his forehead, but his wound was not life-threatening.
Note that the sources about what actually happened vary, and I don't have an accurate one about the events.
Firstly, the upper classes were mortified by the attack. The Emperor and Empress sent telegrams of condolence to the Tsar and Tsarina, and published a special rescript proclaiming that it was the Emperor's will that "justice take its speedy course on the miscreant offender".
There were all manner of contemporary theories on the attack (in the days following it); there was speculation that the assailant was a Russian nihilist in disguise, a fugitive from banishment to the Sakhalin islands or Siberia or if he was Japanese and in the pay of Russian revolutionaries.
However, it seems Tsuda Sanzo acted alone. He wasn't killed in the incident, and so he was interviewed. He was a thirty six year old ex-Samurai from the Iga province, with a solid background of military/police service, and had seemed the ideal man for the job. Tsuda told his interrogators that he had tried to kill Nicholas for being discourteous to the Japanese emperor, as Tsuda believed that he should have begun his tour of Japan by paying his respects to the Emperor in Tokyo. Tsuda also believed that for Nicholas to have visited Otsu and Kagoshima was a sign of "ambition", the ambition being to take over Japan. He spoke at great length about Russian encroachment on Japanese spheres of influence, the Russian takeover of Sakhalin in 1875, the raids of Khvostov and Davytov on Japan's northern territory (early 19th century). He conveyed the idea that the arrival of Nicholas II with a sizeable fleet of warships was some new plot against Japan.
There are also some theories that the incident affected Nicholas' decision to go to war with Japan, although some contemporary sources at the time indicate otherwise. Nicholas assured the Emperor Meiji that he "had nothing but admiration" for the way he had been greeted, bore no grudge for the attempt on his life, and was grateful for the Emperor's solicitude. However, Nicholas did not continue the tour to Tokyo, instead, travelling back to Vladivostok and travelling back to St Petersburg, despite the pleadings of the Japanese. The Japanese embassy in St. Petersburg mentioned their sorrow would be "boundless" if the Tsarevich did not continue the tour.
One of the most interesting cases in Japanese legal history followed the incident, as Japan was agitating to remove Western influence at the time, and the government believed that only the death penalty would appease the Russians. Article 116 stated that the death penalty could be given for an assault on the Imperial family, but Nicholas did not qualify as such, and thus the government declared Nicholas a guest of the Imperial Emperor, and attempted to extend the terms of Article 116 to Nicholas. The Supreme court disagreed with this and convicted him of "unsuccessful attempt to commit wilful murder" and imprisoned him for life with hard labour, and this is one of the best examples of the independence of the judiciary.
The Russians were none too concerned with this verdict. Indeed, the Mainichi Shimbun (Daily News-forgive if this is poor Japanese, that's wikipedia's translation) reported "We have nothing but praise to give the Russians for their calm treatment of this affair, for their magnanimity, and for their speedy recognition of the services rendered by Japanese of the humblest class... ... It behoves us to do everything in our power henceforth to increase intercourse with Russia". The end result of the incident seemed to be a deepening of the relationship of the two powers.