In the novel, during Zhuge Liang's third Northern Expedition, after committing a strategic blunder, he tried to push the blame to Wei Yan but Zhuge Liang held him responsible and executed him.
In the context of the novel, during Zhuge Liang's third Northern Expedition, following a critical mistake, he attempted to deflect responsibility onto Wei Yan but ultimately took full responsibility himself and had Wei Yan punished as a result.