Thinking I might miss the train, I left home early in the morning.
Literal
Train [to-に] might-miss [complementizer-と] thought, morning early home [object-を] left.
Classic quotative chain: ~かもしれない ('might, perhaps') + と思い (the conjunctive form of と思う, linking to the next clause) + main clause. The ~といけない framing ('if X happens, it won't do' = 'not wanting X to happen') is common for expressing worry. ~と思い出た ('thinking/worrying that, I left') wraps the thought as the reason for the action.