Hulu Plus subscribers who pay $8 a month will be able to see the back seasons of the show in September.
The fourth season of the show wraps up in March and the fifth season is expected in the fall.
CBS had previously not licensed shows that were still on air to online video providers. It lifted that restriction with some reality TV shows such as "Survivor" and "The Amazing Race," which began playing on Hulu Plus in January.
CBS was the last among the broadcasters to see the benefit of putting back seasons of currently airing TV shows online.
After studying the matter, executives came to believe that putting shows that have season-long story lines online allows fans to catch up. Those fans then show up to watch new episodes when they air on TV.
"We looked at this as an opportunity to get the most amount of money and give the shows the best exposure to increase ratings on the network," said CBS' chief content licensing officer, Scott Koondel, in an interview.
Past episodes of "The Good Wife" will also run on The Hallmark Channel next January and on local TV stations in September 2014.