To claim a Qualified Child dependent, he cannot have provided over one half of his own support in 2016.
To claim him as a Qualified Relative dependent, you must have provided over one half of his own support in 2016.
Because he was incarcerated for 9 months in 2016, he would not meet the support test on either of the above. In the event of an audit, The IRS is likely to determine that he provided over one half of his own support in 2016.
See Rules For Claiming Dependents