The SBU said in a statement that one of the soldiers had received a 10-year sentence and the other had been jailed for nine years.
It did not name them, say how they had pleaded and when they were sentenced, but said both had fought in eastern Ukraine and were captured last year.
"As a result of investigative actions, indisputable evidence on the guilt of two more militants who joined the ranks of the occupation groups of the aggressor country at the beginning of the full-scale invasion was collected," it said.
Both "took an active part in the storming of Ukrainian cities on the Eastern Front", it said.
It said one had started fighting for Russia-backed separatists in eastern Ukraine in 2014 and fought for the Russian army in the Bakhmut area of eastern Ukraine last year.
The other was in charge of Russian troops that shelled the eastern cities of Sievierodonetsk and Lysychansk in eastern Ukraine, and was captured along with a number of his subordinates, it said.
They were found guilty under laws on the encroachment on the territorial integrity and inviolability of Ukraine, and on participation in paramilitary or armed formations not provided for by law, the SBU added.
Moscow has denied that Russian forces deliberately target civilians although civilian areas have repeatedly come under fire since Russia's invasion a year ago and towns across Ukraine have been badly damaged or destroyed.
(Reporting by Max Hunder, Editing by Timothy Heritage)