A flat quadratic Lie algebra (g, ( , ), k) is a Lie algebra g endowed with a flat pseudo-Euclidean metric ( , ) and a quadratic structure k. In geometrical terms, it is a Lie algebra of a Lie group endowed with both a flat left-invariant pseudoRiemannian metric and a bi-invariant metric. It is known that if a Lie algebra admits a symplectic form and a quadratic structure then it is a flat quadratic Lie algebra. In this paper, we show that there exist non-abelian Lie algebras which admit a flat Lorentzian metric and a quadratic structure. If g is such Lie algebra, then we show that g is a trivial central extension of R Kappa H2k +1 and [g, g] H2k+1, where H2k +1 is the Heisenberg Lie algebra and k > 2. In particular, we prove that g is 3-step solvable, not nilpotent and hence admits no symplectic structure. We show that there exists only one non-abelian Lie algebra of dimension n < 6 which admits a flat Lorentzian metric and a quadratic structure. Using a variant of the double extension method, which conserves both the flat and the quadratic metrics, we prove that any Lie algebra which admits a flat Lorentzian metric and a quadratic structure, is a double extension of an abelian Lie algebra and we construct a large class of such (non-abelian) Lie algebras in higher dimensions. Oscillator Lie algebras denoted by g lambda constitute an important class of quadratic Lie algebras which are of the form R Kappa H2k+1. It is known that g lambda admits no flat Lorentzian metric. We show in this paper that g lambda admits a Ricci-flat Lorentzian metric. The paper also study the class of quadratic 2-step nilpotent Lie algebras (g, k) which constitute examples of flat quadratic Lie algebras since k is also flat in this case. (c) 2021 Elsevier Inc. All rights reserved.