In multihop ad hoc networks, a jammer can drastically disrupt the flow of information by intentionally interfering with links between a subset of nodes. The impact of such attacks is escalated when the jammer is moving. As a countermeasure for such attacks, adaptive beamforming techniques can be employed for spatial filtering of the jamming signal. This paper investigates the performance of adaptive beam nulling as a mitigation technique against jamming attacks in multihop ad hoc networks. Considering a moving jammer, a distributed beam nulling framework is proposed. The framework uses periodic measurements of the RF environment to detect direction of arrival (DoA) of jamming signal and suppresses the signals arriving from the current and predicted locations of the jammer. Also, in the calculation of nulled region, this framework considers and counters the effects of randomness in the mobility of the jammer, as well as errors in beam nulling and DoA measurements. Survivability of links and connectivity in such scenarios are studied by simulating various node distributions and different mobility patterns of the attacker. Also, the impact of errors in the estimation of DoA and beamforming on the overall network performance is also examined. In comparison with omnidirectional configuration, results indicate a 57.27\% improvement in connectivity under jamming when the proposed framework is applied.