Cocceji was born in Heidelberg. By 1702 he was a professor at Viadrina University in Frankfurt (Oder) in the Kingdom of Prussia. By 1723 he was Kammergerichtspräsident (president of the superior court of justice), from 1738-39 he was chairman of the Prussian justice department, and by 1747 he was Großkanzler (grand chancellor). King Frederick II of Prussia appointed Cocceji to lead the legal reorganization of annexed Silesia. Cocceji subsequently reformed the legal system of all of Prussia.