Low-duty-cycle network plays an crucial role in improving energy efficiency of wireless communication, where nodes stay asleep most of time. Despite energy saving, the security of low-duty-cycle networks is of great concern. The attacking strategy design becomes even more challenging considering the stochastic transmission patterns arising from both the clock drift and other uncertainties. In this paper, we propose LearJam, a novel two-phase energy-efficient learningbased jamming attack strategy against low-duty-cycle networks, where the attacker estimates the distribution of transmission period in the learning phase, and schedules its jamming attacks in the attacking phase based on this estimated distribution. We jointly optimize the learning duration and the attacking duration under the energy constraint in order to degrade the network throughput to the maximal degree. We propose simple yet effective methods to solve both the single-node and multi-node scenarios. We further discuss a state-of-theart mechanism defending against LearJam by re-scheduling transmission pattern, which will aid the researchers to improve the security of low-duty-cycle networks. Extensive simulations show that our design achieves significantly higher number of successful attacks (increasing 38%-762%) in a sparse lowduty-cycle network compared with some traditional jamming strategies.