Ulyukayev, who was handcuffed and placed in a courtroom cage after the verdict, looked shocked and said he had been treated unfairly.
The court also ruled that Ulyukayev must pay a fine of more than 130 million roubles ($2.21 million).
In assigning the sentence, Judge Semyonova took into account Ulyukayev's age and health, his multiple awards, letters of appreciation, witness statements about his good character, and the fact that he has young children and elderly parents dependent on him for support.
Prosecutors have asked for a ten-year jail sentence but analysts speculated that the authorities could try to dampen controversy over the case by giving him a soft or suspended sentence.
Further details of the ruling were expected later on Friday. "The important thing is that my wife doesn't find out".
United States soldier who defected to North Korea dies
He later called his desertion a mistake that led to decades of deprivation and hardship in the communist country. The life of ex-US Army sergeant Charles Robert Jenkins as a defector to North Korea reads like dramatic novel.
A court in Moscow found Ulyukayev guilty of demanding and accepting the bribe on November 14 previous year.
Ulyukayev said the sentence was "unjust" and vowed to appeal.
Sechin told investigators that Ulyukayev had demanded the bribe in return for backing a controversial deal in which Rosneft acquired a stake in Bashneft, another state-run oil group. He said he had thought the bag holding the bribe was a gift of expensive alcohol.
Ulyukayev had originally opposed the sale of the stake to Rosneft but later endorsed it after Putin said it would help fill state coffers.
The judge accepted the prosecutors' allegation that the former economy minister had shown Sechin two fingers, which they claimed was code for $2m. "Forgive me for that, people", he told the court, wiping his forehead with a handkerchief.