A motor driving device, comprising: a housing unit including a main housing, a cover fastened to said main housing, a first compartment and a second compartment; a capacitor module detachably mounted in said first compartment and including a first circuit board, at least one capacitor electrically connected to said first circuit board, and two first conducting members electrically connected to said first circuit board; and a driving module mounted in said second compartment and including a second circuit board and two second conducting members that are electrically connected to said second circuit board and that are respectively, electrically and detachably connected to said first conducting members; the motor driving device being characterized in that: said main housing includes a partition plate, and a surrounding wall that is connected to and surrounds a periphery of said partition plate and that has an upper surrounding portion and a lower surrounding portion divided by said partition plate; said partition plate, said upper surrounding portion and said cover cooperate with one another to define said first compartment, said partition plate cooperates with said lower surrounding portion to define said second compartment; said upper surrounding portion is formed with a plurality of slot units, each of which is in spatial communication with said first compartment and the ambient surroundings and is adapted for an electric cable (51, 52) to pass therethrough; said partition plate is formed with two openings; and each of said second conducting members includes a positioning segment that is electrically connected to said second circuit board, and an extending segment that is connected to said positioning segment, that extends into a respective one of said openings of said partition plate, and that is electrically connected to a respective one of said first conducting members. a housing unit including a main housing, a cover fastened to said main housing, a first compartment and a second compartment; a capacitor module detachably mounted in said first compartment and including a first circuit board, at least one capacitor electrically connected to said first circuit board, and two first conducting members electrically connected to said first circuit board; and a driving module mounted in said second compartment and including a second circuit board and two second conducting members that are electrically connected to said second circuit board and that are respectively, electrically and detachably connected to said first conducting members; the motor driving device being characterized in that: said main housing includes a partition plate, and a surrounding wall that is connected to and surrounds a periphery of said partition plate and that has an upper surrounding portion and a lower surrounding portion divided by said partition plate; said partition plate, said upper surrounding portion and said cover cooperate with one another to define said first compartment, said partition plate cooperates with said lower surrounding portion to define said second compartment; said upper surrounding portion is formed with a plurality of slot units, each of which is in spatial communication with said first compartment and the ambient surroundings and is adapted for an electric cable (51, 52) to pass therethrough; said partition plate is formed with two openings; and each of said second conducting members includes a positioning segment that is electrically connected to said second circuit board, and an extending segment that is connected to said positioning segment, that extends into a respective one of said openings of said partition plate, and that is electrically connected to a respective one of said first conducting members. said main housing includes a partition plate, and a surrounding wall that is connected to and surrounds a periphery of said partition plate and that has an upper surrounding portion and a lower surrounding portion divided by said partition plate; said partition plate, said upper surrounding portion and said cover cooperate with one another to define said first compartment, said partition plate cooperates with said lower surrounding portion to define said second compartment; said upper surrounding portion is formed with a plurality of slot units, each of which is in spatial communication with said first compartment and the ambient surroundings and is adapted for an electric cable (51, 52) to pass therethrough; said partition plate is formed with two openings; and each of said second conducting members includes a positioning segment that is electrically connected to said second circuit board, and an extending segment that is connected to said positioning segment, that extends into a respective one of said openings of said partition plate, and that is electrically connected to a respective one of said first conducting members.