There are many onomatopoeias in Japanese, and “doki doki（どきどき、ドキドキ）” is one of them.
“Doki doki” means that the heart strikes hard.
If you exercise, your heart becomes “dokidoki”, something good happens, when you are excited, when you expect something, when you worry, or when you’re upset, your heart rate gets faster, right?
The expression “doki doki suru（ドキドキする）” is used to express such states.
恋 を する と ドキドキ する。
Koi wo suru to doki-doki suru.
I feel excited when falling in love.
見つかってしまうか と ドキドキ した。
Mitsukatte shimauka to doki-doki shita.
I was worried that the enemy would find me.
インタビュー の 順番 を ドキドキ しながら 待った。
Intabyuu no junban wo doki-doki shinagara matta.
I had butterflies in my stomach while waiting for my interview.
飛行機 に 乗ると ドキドキ する。
Hikouki ni noru to doki-doki suru.
I get nervous when I board an airplane.
お酒 を 飲むと ドキドキ するので 飲みません。
Osake wo nomuto doki-doki surunode nomimasen.
I don’t drink alcohol because my heart always beats if I drink.
階段を上ると ドキドキ した。
Kaidan wo noboruto doki-doki shita.
My heart beat so fast when I climbed up the stairs.
The origin of the Japanese word “doki-doki”?
There is a word “douki（どうき：動悸）” in Japanese.
This word is used like “douki ga suru（動悸（どうき）がする）” or “douki wo kanjiru（動悸（どうき）を感（かん）じる）” when you feel palpitation.
For this reason, many Japanese believe that “doki doki” is derived from “douki”, but this does not seem to be the case. This is because “doki doki” and “douki” are used separately in the existing Edo period documents.
However, in the Showa era, some writers had a kind of play in their work, which they wrote “douki-douki（動悸動悸）” and let the readers read it “doki doki” by giving “furigana” for the word.
(FURIGANA: Furigana is comprised of small letters written or printed on the side of some kanjis to indicates how to read it. It may or may not be presented.
It is usually attached to the first kanji that appears, and the same reading does not appear afterward, because the reader is supposed to know it.
Children’s books may have a lot of furigana so that children can learn.)
It is thought that then people who read it started to mix up “doki-doki” and “douki-douki”.
In any case, “douki” means “doki-doki”, so I thought it was an interesting idea.