Human behavior can change the spread of infectious disease. There is limited understanding of how the time in the future over which individuals make a behavioral decision, their planning horizon, affects epidemic dynamics. We developed an agent-based model (along with an ODE analog) to explore the decision-making of self-interested individuals on adopting prophylactic behavior. The decision-making process incorporates prophylaxis efficacy and disease prevalence with individuals' payoffs and planning horizon. Our results show that for short and long planning horizons individuals do not consider engaging in prophylactic behavior. In contrast, individuals adopt prophylactic behavior when considering intermediate planning horizons. Such adoption, however, is not always monotonically associated with the prevalence of the disease, depending on the perceived protection efficacy and the disease parameters. Adoption of prophylactic behavior reduces the peak size while prolonging the epidemic and potentially generates secondary waves of infection. These effects can be made stronger by increasing the behavioral decision frequency or distorting an individual's perceived risk of infection.