The measurement process plays an awkward role in quantum mechanics, because measurement forces a system to `choose' between possible outcomes in a fundamentally unpredictable manner. Therefore, hidden classical processes have been considered as possibly predetermining measurement outcomes while preserving their statistical distributions. However, a quantitative measure that can distinguish classically determined correlations from stronger quantum correlations exists in the form of the Bell inequalities, measurements of which provide strong experimental evidence that quantum mechanics provides a complete description. Here we demonstrate the violation of a Bell inequality in a solid-state system. We use a pair of Josephson phase qubits acting as spin-1/2 particles, and show that the qubits can be entangled and measured so as to violate the Clauser-Horne-Shimony-Holt (CHSH) version of the Bell inequality. We measure a Bell signal of 2.0732+/-0.0003, exceeding the maximum amplitude of 2 for a classical system by 244 standard deviations. In the experiment, we deterministically generate the entangled state, and measure both qubits in a single-shot manner, closing the detection loophole. Because the Bell inequality was designed to test for non-classical behaviour without assuming the applicability of quantum mechanics to the system in question, this experiment provides further strong evidence that a macroscopic electrical circuit is really a quantum system.