The structure and flexibility of the outer membrane protein X (OmpX) in a water-detergent solution and in pure water are investigated by molecular dynamics simulations on the 100-ns timescale and compared with NMR data. The simulations allow for an unbiased determination of the structure of detergent micelles and the protein-detergent mixed micelle. The short-chain lipid dihexanoylphosphatidylcholine, as a detergent, aggregates into pure micelles of approximately 18 molecules, or alternatively, it binds to the protein surface. The detergent binds in the form of a monolayer ring around the hydrophobic beta-barrel of OmpX rather than in a micellar-like oblate; approximately 40 dihexanoylphosphatidylcholine lipids are sufficient for an effective suppression of water from the surface of the beta-barrel region. The phospholipids bind also on the extracellular, protruding beta-sheet. Here, polar interactions between charged amino acids and phosphatidylcholine headgroups act as condensation seed for detergent micelle formation. The polar protein surface remains accessible to water molecules. In total, approximately 90-100 detergent molecules associate within the protein-detergent mixed micelle, in agreement with experimental estimates. The simulation results indicate that OmpX is not a water pore and support the proposed role of the protruding beta-sheet as a "fishing rod".