With the rapid advancement of quantum computing, the security of quantum circuits has become a critical concern, particularly against hardware Trojans that can be stealthily in- serted during design or compilation. Even the insertion of a single quantum gate, such as Pauli-X, Hadamard, CNOT, or SWAP, may significantly alter circuit behavior. In this work, we propose an automated detection framework based on the pretrained Code- BERT model, originally developed for programming languages, to identify Trojan-induced anomalies in circuits represented in Quantum Assembly Language (QASM). By treating gate se- quences as structured code, our approach leverages Transformer- based contextual learning without requiring manual feature engineering. Experiments on over 2,500 samples constructed from benchmark circuits demonstrate that our model achieves 96.1% accuracy and 97.0% F1 score in binary classification, with recall exceeding 97.5% for all Trojan types. In multiclass classification, the model reaches 91.1% accuracy, successfully distinguishing different Trojan gate insertions. Compared with a convolutional neural network (CNN) baseline, CodeBERT consistently achieves superior recall and robustness. These results highlight the ef- fectiveness and scalability of CodeBERT for securing quantum circuits against hardware Trojan threats.