This article develops a piecewise-deterministic Markov process (PDMP) for modeling freeway traffic dynamics due to random incidents. The random uncertainties in the occurrence and clearance of freeway accidents are modeled as stochastic transitions between a set of discrete modes. For a given accident location, the transition rates from an accident mode are determined by state-dependent congestion level. The impact of an accident is captured as reduced capacity at the location of the accident. The macroscopic traffic state within each accident mode evolves according to the nonlinear cell transmission model (CTM). The resulting stochastic switched system admits an intra-modal representation, where the nonlinear dynamics can be represented as piecewise-linear dynamics. This piecewise linear dynamics naturally leads to a PDMP representation. Some qualitative properties of a two-cell example are studied. Finally, a few design implications for control of accident-prone freeways are discussed.