Estimating the radiated energy of small-to-moderate (Mw < 5) events remains challenging because their waveforms are strongly distorted during wave propagation. Even when near-source records are available, seismic waves pass through the shallow crust with strong attenuation; consequently, high-frequency energy may be significantly dissipated. Here, we evaluated the degree of energy dissipation in the shallow crust by estimating the depth-dependent attenuation (Q-1) by modeling near-source (< 12 km) waveform data in northern Ibaraki Prefecture, Japan. High-quality waveforms recorded by a downhole sensor confined by granite with high seismic velocity helped to investigate this issue. We first estimated the moment tensors for M1–4 events and computed their synthetic waveforms, assuming a tentative one-dimensional -model. We then modified the -model in the 5–20 Hz range such that the frequency components of the synthetic and observed waveforms of small events (Mw < 1.7) matched. The results show that the Q-value is 55 at depths of < 4 km and shows no obvious frequency dependence. Using the derived -model, we estimated the moment-scaled energy (eR) of 3,884 events with Mw 2.0–4.5. The median eR is 3.6×10-5 , similar to the values reported for Mw >6 events, with no obvious Mw dependence. If we use an empirically derived Q-model (~350), the median eR becomes a one-order underestimation (3.1×10-6). These results indicate the importance of accurately assuming the Q-value in the shallow crust for energy estimation of small events, even when near-source high-quality waveforms are available.