TR-DETR is a task-reciprocal transformer designed for joint moment retrieval (MR) and highlight detection (HD) based on natural language queries. The method explores the inherent reciprocity between MR and HD tasks, aiming to improve performance by leveraging their mutual dependencies. The proposed framework includes three key modules: a local-global multi-modal alignment module to align visual and textual features, a visual feature refinement module to eliminate query-irrelevant information, and a task cooperation module to refine the retrieval pipeline and highlight score prediction through task reciprocity. The local-global alignment module aligns features from different modalities into a shared latent space, while the visual feature refinement module filters out irrelevant information to enhance modal interaction. The task cooperation module integrates highlight scores into the moment retrieval process and uses retrieved moments to refine highlight scores. Comprehensive experiments on QVHighlights, Charades-STA, and TVSum datasets show that TR-DETR outperforms existing state-of-the-art methods. The method achieves superior performance by effectively utilizing the reciprocal relationship between MR and HD tasks, leading to improved accuracy in both moment retrieval and highlight detection. The proposed TR-DETR demonstrates the effectiveness of task reciprocity in enhancing the performance of joint MR and HD tasks.TR-DETR is a task-reciprocal transformer designed for joint moment retrieval (MR) and highlight detection (HD) based on natural language queries. The method explores the inherent reciprocity between MR and HD tasks, aiming to improve performance by leveraging their mutual dependencies. The proposed framework includes three key modules: a local-global multi-modal alignment module to align visual and textual features, a visual feature refinement module to eliminate query-irrelevant information, and a task cooperation module to refine the retrieval pipeline and highlight score prediction through task reciprocity. The local-global alignment module aligns features from different modalities into a shared latent space, while the visual feature refinement module filters out irrelevant information to enhance modal interaction. The task cooperation module integrates highlight scores into the moment retrieval process and uses retrieved moments to refine highlight scores. Comprehensive experiments on QVHighlights, Charades-STA, and TVSum datasets show that TR-DETR outperforms existing state-of-the-art methods. The method achieves superior performance by effectively utilizing the reciprocal relationship between MR and HD tasks, leading to improved accuracy in both moment retrieval and highlight detection. The proposed TR-DETR demonstrates the effectiveness of task reciprocity in enhancing the performance of joint MR and HD tasks.