You do have to pass through immigration, collect your bags, pass through security and re-check your bags.
140 minutes might be OK, a little tight but doable. If your nationality requires you to have a transit visa from Turkey then you definitely need a visa/eVisa for this. It is not a direct air-side transfer.
Run, Don't walk!
As noted in George's comment below, if you don't have checked baggage then you don't need to go through these steps. You can check-in online, have a boarding pass and go straight to your gate after passing security.