HOUSTON—A former engineer for BP PLC was arrested Tuesday and accused of destroying evidence relating to the 2010 Deepwater Horizon explosion and oil spill, the first criminal case to arise from the incident.

Federal prosecutors charged Kurt Mix of Katy, Texas, with two counts of obstruction of justice for deleting from his iPhone hundreds of text messages about the spill that he exchanged with a co-worker and a contractor, according to a criminal complaint unsealed Tuesday.

Mr....