Federal Judge Richard Berman announced the sentence Tuesday after hearing Cameron Douglas apologize and admit that he had squandered a lot of opportunities to turn his life around.
The judge said earlier that he did not have confidence that Douglas would turn his back on drugs after pleading guilty in January to drug charges.
The troubled 31-year-old son of the Academy Award-winning actor admitted to dealing methamphetamine and cocaine. He had faced a 10-year term.
With his father in court, Douglas listened as Berman described his drug abuse since age 13.
The judge noted Cameron has been sober in prison since last August, the longest stint drug-free since his teen-age years. But he said thatfailed to note the damage drugs do to society.
In the 2000 film Traffic, Michael Douglas played a conservative judge who is appointed national drug czar only to learn that his teenage daughter is addicted to cocaine.
The elder Douglas has said that his family's fame and history of substance abuse helped drive his son into addiction and crime, and asked the judge to show leniency.
"I love my son, but I'm not blind to his actions. ... I don't want to see him break," the actor told the federal judge in a handwritten letter made public Monday.
The five-page letter, penned in an elegant script, joins others written to the court by Cameron Douglas' high-profile supporters, including grandfather, stepmother Catherine Zeta-Jones and NBA executive Pat Riley.
In his letter, Douglas paints his son's problems as the product, in part, of a privileged but difficult childhood, a family legacy of drug and alcohol problems and the long shadow cast by a family of screen icons.
"I have some idea of the pressure of finding your own identity with a famous father," wrote Douglas, who starred in "Wall Street" and whose father Kirk starred in "Spartacus." "I'm not sure I can comprehend it with two generations to deal with."
As the only child of a "bad marriage" between an often absent Michael Douglas and his first wife, Diandra Douglas, "Cameron found his family in the gang mentality," his father wrote.
He said his son developed a substance abuse problem at 13, sloughed off at school and balked at the idea of rehab unless it was legally required.
Cameron Douglas eventually found some success as a club DJ and got some movie roles, including one in 2003's "It Runs in the Family," starring his father and grandfather. But he spiraled into a heroin addiction and, according to his lawyers, began dealing meth in 2006 to support himself after being cut off from the family fortune because he wouldn't get treatment.
Citing genes and family as factors in substance abuse, Michael Douglas points in his letter to relatives' drug and alcohol problems, though their names have been redacted.
Douglas has said he was treated at an Arizona clinic for alcohol abuse in the 1990s. His half-brother, Eric Douglas, died in 2004 of an accidental overdose of alcohol and prescription pills after years of struggling with addiction.