I'm not sure which novel you're referring to, but there could be many reasons why the third brother of the female protagonist killed Qing Yan. Maybe it was because Sha Qingyan was the master of the female protagonist, so he had a special relationship with him, or maybe it was because Sha Qingyan played an important role in the novel, so he needed him to kill Qing Yan. The specific reason needed to be determined according to the plot and background of the novel.