He was eventually promoted to general of infantry in 1902, reassigned to command the Russian 6th Army Corps in 1900, and in 1904 was honored with the title aide-de-camp to Nicholas II.
During the ensuing Battle of Sandepu in January 1905, Gripenberg perceived a weakness in the Japanese lines and launched a surprise assault that threw the enemy's left flank into disarray.
Relations between the two officers had been strained from the beginning and Gripenberg asked to be relieved of his command of the 2nd Manchurian Army on 29 January 1905, only a day after the battle ended.
Nicholas II still thought highly of Gripenberg, and on 30 April 1905 appointed him Inspector General of the Infantry on 28 June 1905, and as a member of the State Council.
As Inspector General, he developed a new manual for shooting, but on 23 March 1906, frustrated by health, he resigned from active service, but remained on the State Councilor nominally as General-Adjutant.
He spent his final days in continuing his campaign against Kuropatkin in the newspapers, pamphlets and books, blaming him for the Russian defeat at the Battle of Mukden and for the loss of the war in general.