Entanglement in a quantum system can be demonstrated experimentally by performing the measurements prescribed by an appropriate entanglement witness. However, the unavoidable mismatch between the implementation of measurements in practical devices and their precise theoretical modelling generally results in the undesired possibility of false-positive entanglement detection. Such scenarios can be avoided by using the recently developed device-independent entanglement witnesses (DIEWs) for genuine multipartite entanglement. Similarly to Bell inequalities, DIEWs only assume that consistent measurements are performed locally on each subsystem. No precise description of the measurement devices is required. Here we report an experimental test of DIEWs on up to six entangled 40Ca+ ions. We also demonstrate genuine multipartite quantum nonlocality between up to six parties with the detection loophole closed.