Complex sentence: The Cook County Democratic Organization declined to endorse him in his bid for reelection as State's Attorney but he won the primary anyhow, but, however lost in the main election after many African Americans chose not to vote for him.
Split into simpler sentences: The Cook County Democratic Organization declined to endorse him in his bid for reelection as State's Attorney but he won the primary anyhow. However in the main election he lost after many African Americans chose not to vote for him.