[verb (plain)] + と思いきや [i-adj (plain)] + と思いきや [na-adj (plain: だ/な)] + と思いきや [noun (plain: だ)] + と思いきや
と思いきや is used to express that something the speaker (or someone else) expected to happen turned out differently – the actual result was contrary to the expectation. It conveys surprise or an unexpected twist, similar to "just when I thought…" or "I was sure that… but then…" in English.
This is a relatively literary and expressive structure, commonly found in storytelling, narration, essays, and dramatic speech. It is at home in both written and spoken Japanese but carries a somewhat dramatic or emphatic tone.
Attach と思いきや directly after a clause in plain form (past or non-past). The clause before と思いきや states the expectation, and the clause after it states the surprising reality.
The key nuance of と思いきや is the gap between expectation and reality. The result is always something unexpected or surprising – it can be positive or negative. Because of this dramatic quality, it is used when recounting events that had an ironic or surprising outcome.
とおもったら思ったら also expresses "just when I thought…", but it is more conversational and neutral. と思いきや is more emphatic and literary, stressing the surprising contrast more strongly.