Catalyzes the NAD(+)-dependent oxidation of L-carnitine to 3-dehydrocarnitine. Is specific for L-carnitine and NAD(+) as substrates since D-carnitine, other carnitine analogs such as choline and betaine, and NADP(+) are not substrates. Despite a high similarity to 3-hydroxyacyl-CoA dehydrogenases, cannot dehydrogenate 3-hydroxybutylate and 3-hydroxybutyl-CoA. Is probably involved in a L-carnitine degradation pathway that allows Xanthomonas translucens to grow on L-carnitine as the sole source of carbon and nitrogen. carnitine + NAD(+) = 3-dehydrocarnitine + H(+) + NADH The enzyme activity is strongly inhibited by Ag(+), Ni(+), Hg(+), and p-chloromercuribenzoate, and partially inhibited by Li(+), Ca(2+), Mn(2+), Co(2+), Cu(2+), and Zn(2+). Part of the values are for the recombinant protein expressed in E.coli (PubMed:20530902). Other values are for the wild-type protein (Ref.2). Optimum pH is 9.5 for the oxidation reaction and 6.5 for the reduction reaction. Amine and polyamine metabolism; carnitine metabolism. Homodimer. Belongs to the 3-hydroxyacyl-CoA dehydrogenase family. L-carnitine dehydrogenase subfamily.