We describe the emergence of nonassociative geometries probed by closed strings in non-geometric flux compactifications of string theory. We show that these non-geometric backgrounds can be geometrised through the dynamics of membranes propagating in the phase space of the target space compactification. Quantization of the membrane sigma-model leads to a proper quantization of the nonassociative background, which we relate to Kontsevich's formalism of global deformation quantization. We construct Seiberg-Witten type maps between associative and nonassociative backgrounds, and show how they may realise a nonassociative deformation of gravity. We also explain how this approach is related to the quantization of certain Lie 2-algebras and cochain twist quantization using suitable quasi-Hopf algebras.