1. Environmental DNA (eDNA) metabarcoding has become widely applied to gauge biodiversity in a non-invasive and cost-efficient manner. The detection of species using eDNA metabarcoding is, however, imperfect owing to various factors that can cause false negatives in the inherent multistage workflow. Imperfect detection in the multistage workflow of eDNA metabarcoding also raises an issue of study design, namely, how available resources should be allocated among the different stages to optimize survey efficiency.2. Here, we propose a variant of the multispecies site occupancy model for eDNA metabarcoding studies where samples are collected at multiple sites within a region of interest. Unlike traditional site occupancy models that deal with binary detection data, this model describes the variation in sequence reads, the output of the high-throughput sequencers. It explicitly accounts for the hierarchical workflow of eDNA metabarcoding and interspecific heterogeneity and allows the analysis of the sources of variation in the detectability of species throughout the different stages of the workflow. We also introduced a Bayesian decision analysis framework to identify the study design that optimizes the effectiveness of species detection with a limited budget.3. An application of the model to freshwater fish communities in the Lake Kasumigaura watershed, in Japan, highlighted a remarkable inhomogeneity in the detectability of species, indicating a potential risk of the biased detection of specific species.Species with lower site occupancy probabilities tended to be difficult to detect as they had lower capture probabilities and fewer sequence reads. The expected abundance of sequence reads was predicted to vary by up to 23.5 times among species. An analysis of the study design suggested that ensuring multiple withinsite replications of the environmental samples is preferred to achieve higher species detection effectiveness, provided that tens of thousands of sequence reads were secured per replicate.4. The proposed framework makes the application of eDNA metabarcoding more error-tolerant, allowing ecologists to monitor ecological communities more efficiently.