上司が事実を知ったとき、彼はその嘘のせいでトラブルに巻き込まれた。

English Translation

The lie got him in trouble when his boss found out the truth.

Bad translation… The original Japanese sentence is more likely interpreted as “When the boss found out the truth, the boss (= he) got in trouble due to that lie”. Here are three problems:

  • 上司が事実を知った and 彼は巻き込まれた are in parallel, so it sounds like 上司 and 彼 are the same person.

  • 事実を知った and その嘘のせいで are also in parallel. This sentence structure suggests that the truth and the lie are not related. For example, the boss found out that his wife was cheating on him. At the same moment, the boss got in trouble because he believed in a fake news talking about an optimistic economic forecast and lost a lot of money from a bad investment.

  • トラブルに巻き込まれた suggests that he is an innocent victim. But the English sentence means that he told a lie and it was found out by his boss, so he got in trouble. But that’s all his fault.

My alternative translation is:

嘘が上司にバレて、彼はピンチに陥った。(うそがじょうしにバレて、かれはピンチに陥った)

バレる is often spelled as バレ in Katakana and る in Hiragana, meaning "to be revealed (of a secret). But ばれる (all in Hiragana) is also okay. According to a prominent linguist, 暴く(あばく)= “to reveal” is the origin of バレる. 暴ける(あばける)is a passive form of 暴く, and あばける was phonetically transformed into ばる, and eventually ばる.
バレる has some derivative forms such as バレバレだ = that’s too obvious/everybody can notice that; and 親バレする = my secret was revealed by my parent(s).

ピンチ is also a frequent loan word from “pinch” in English. 陥る means “to bog down in (a difficult situation)”. ピンチに陥る is a set phrase.