Satellite-terrestrial integrated networks have recently gained substantial interest due to their exceptional coverage, lower transmission delay, robust storage, and computing power. However, existing task offloading schemes often fail to effectively manage task dependencies, resulting in incorrect execution sequences, increased end-to-end delay, and excessive energy consumption. To address these challenges, we propose a dependency-aware task offloading framework for jointly optimizing delay and energy consumption in satellite-terrestrial collaborative networks with mobile-edge computing (MEC). First, we construct a directed acyclic graph (DAG) based dependency-aware task offloading framework aimed at reducing delay and energy consumption. Second, to reduce the frequency of low Earth orbit (LEO) satellite access, we design a cluster head selection strategy (CHSS), which leverages DAG-based task dependencies to optimize the association between Internet of Things (IoT) devices and LEO satellites. Finally, we formulate system delay and energy consumption as a cost-minimization problem, modeling it as a Markov decision process (MDP). We also propose a novel hybrid deep reinforcement learning (DRL) algorithm to effectively handle DAG structures and optimize task offloading decisions, thereby minimizing the total cost. Extensive simulation results confirm the effectiveness of the proposed method, demonstrating that the proposed algorithm significantly outperforms others by reducing system delay by 18.07% and decreasing energy consumption by 21.15% on average, respectively. © 2025 Elsevier B.V., All rights reserved.