[verb (plain)] + かと思いきや [i-adj] + かと思いきや [na-adj] + かと思いきや [noun] + かと思いきや
かと思いきや means "I thought…, but": the first half is what you expected, and the second half is what actually happened, to your surprise. A verb or an い-adjective comes before it in the plain form, and a noun or a な-adjective takes it directly, with no だ.
The second half reports what happened, so it is a statement, usually in the past. It is never a request or something you mean to do.
思いきや is classical Japanese, roughly "I had thought", and the pattern belongs to writing: stories, essays, news commentary, and spoken anecdotes told for effect. In conversation you say とおもったら思ったら or とおもった思ったけど.