赶紧 and 赶快 are often used before the predicate as an adverbial, which can be used in a declarative sentence or an imperative sentence. They can’t be put before the subject.
Subject + 赶紧 / 赶快 + Verb
孩子生病了，要赶紧/赶快送去医院。(Hái zi shēngbìngle, yào gǎnjǐn/gǎnkuài sòng qù yīyuàn.) The child is ill and should be taken to the hospital immediately.
你赶紧/赶快准备一下，客人要到了。(Nǐ gǎnjǐn/gǎnkuài zhǔnbèi yīxià, kèrén yào dàole.) Get ready, the guests are coming.
Note that these two words are not usually used in a negative form. But when it’s an imperative sentence, it can be in the negative form.
× 你不赶紧/赶快去开门。(Nǐ bù gǎnjǐn/gǎnkuài qù kāimén. )
√ 还不赶紧/赶快去开门！(Hái bù gǎnjǐn/gǎnkuài qù kāimén!) Hurry up to open the door!
× 他没赶紧/赶快做决定。(Tā méi gǎnjǐn/gǎnkuài zuò juédìng.)
√ 还不赶紧/赶快做决定！(Hái bù gǎnjǐn/gǎnkuài zuò juédìng!) Make a decision quickly!
These two words can exchange in most cases, but their focuses of meanings have slight differences. 赶紧 means hurrying up without losing time, hastily. 赶紧 emphasizes the timing, whilst 赶快 emphasizes the fast speed, quickly, at once.
你赶紧去找他，他正在等你。(Nǐ gǎnjǐn qù zhǎo tā, tā zhèngzài děng nǐ.) You hurry to find him; he is waiting for you.
这是最后一张机票，你赶紧买。(Zhè shì zuìhòu yī zhāng jīpiào, nǐ gǎnjǐn mǎi.) This is the last ticket; you hurry up and buy it.
我们赶快走，马上要下雨了。(Wǒmen gǎnkuài zǒu, mǎshàng yào xià yǔle.) Let’s go quickly, it’s going to rain soon.
赶快吃，吃完饭还要开会。(Gǎnkuài chī, chī wán fàn hái yào kāihuì.) Hurry up and eat, and have a meeting after dinner.
立刻 indicates an action or situation happens soon after another action or situation. It can be used in both written and spoken Chinese.
Subject + 立刻 + Verb / Adjective
接到这个通知，我们立刻打电话告诉大家。(Jiē dào zhège tōngzhī, wǒmen lìkè dǎ diànhuà gàosù dàjiā.) Upon receiving this notice, we immediately called to let everyone know.
这个房间打扫以后，立刻就舒服了很多。 (Zhège fángjiān dǎsǎo yǐhòu, lìkè jiù shūfúle hěnduō.) After the room was cleaned, I felt a lot more comfortable immediately.
一说生孩子的事，这对夫妻立刻就不高兴了。(Yī shuō shēng háizi de shì, zhè duì fūqī lìkè jiù bù gāoxìngle.) When it comes to having a baby, the couple is immediately unhappy.
连忙 emphasizes the continuation, connection, or immediate succession of actions. Note that this word can’t be used in the imperative sentence and the action that hasn’t happened yet.
Subject + 连忙 + Verb
老板提出一个想法，大家连忙表示同意。(Lǎobǎn tíchū yīgè xiǎngfǎ, dàjiā liánmáng biǎoshì tóngyì.) The boss proposed an idea, and everyone quickly agreed.
一看到孕妇上车，这个孩子连忙站起来让她座。(Yī kàn dào yùnfù shàng chē, zhège háizi liánmáng zhàn qǐlái ràng tā zuò.) As soon as he saw the pregnant woman getting into the car, the child quickly stood up and gave her a seat.
八点了，同学们连忙走进教室准备上课。(Bā diǎnle, tóngxuémen liánmáng zǒu jìn jiàoshì zhǔnbèi shàngkè.) At eight o’clock, the students rushed into the classroom to prepare for class.
× 你连忙买杯咖啡给我。(Nǐ liánmáng mǎi bēi kāfēi gěi wǒ.)
× 有话连忙说。(Yǒu huà liánmáng shuō.)
With a premium membership, you can access all 29 questions about “赶紧 (gǎnjǐn) vs 赶快 (gǎnkuài) vs 立刻 (lìkè) vs 连忙 (liánmáng)“, as well as online exercises for all grammar points.