This paper develops a new microgrid investment planning model that determines cost-optimal investment and operation of distributed energy resources (DERs) in a microgrid. We formulate the problem in a bilevel framework, using particle swarm optimization to determine investment and the DER-CAM model (Distributed Energy Resources Customer Adoption Model) to determine operation. The model further uses sequential Monte Carlo simulation to explicitly simulate power outages and integrates time-varying customer damage functions to calculate interruption costs from outages. The model treats nonlinearities in reliability evaluation directly, where existing linear models make critical simplifying assumptions. It combines investment, operating, and interruption costs together in a single objective function, thereby treating reliability endogenously and finding the cost-optimal trade-off between cost and reliability—two competing objectives. In benchmarking against a version of the DER-CAM model that treats reliability through a constraint on minimum investment, our new model improves estimates of reliability (the loss of load expectation) by up to 600%, of the total system cost by 6%–18%, of the investment cost by 32%–50%, and of the economic benefit of investing 27%–47%. Improvements stem from large differences in investment of up to 56% for natural gas generators, solar photovoltaics, and battery energy storage.