A Beloit man was sentenced in federal court Tuesday to 22 1/2 years in prison on the charge of producing child pornography.