There's an assoc-in function in clojure.core you can use for this. assoc-in takes an associative data structure (e.g. map, vector), a key-path sequence, and a value to associate at the end of the nested path.
In your case there's no pre-existing structure to associate into, but that's fine because assoc-in uses assoc internally which will create a map if the first argument is nil:
(assoc nil :foo 1)
=> {:foo 1}
So you can define your function in terms of assoc-in with nil as its first argument:
(defn the-function [something value]
(assoc-in nil something value))
And for example if your something sequence consists of symbols:
(the-function '(something2 something3) 'value)
=> {something2 {something3 value}}
(the-function (map str (range 4)) :foo)
=> {"0" {"1" {"2" {"3" :foo}}}}
I want to access the value using (get-in theMap [:something2 :something3]) but it returns nil
Typically you'll see Clojure map literals use keyword keys, although many other types will also work fine, and they can be mixed:
(the-function [:foo "bar" 'baz] \z)
=> {:foo {"bar" {baz \z}}}
You could convert your input sequence into keywords either before you call your function (or inside it if you want to enforce keyword-keys for all callers).
(the-function (map keyword '(something2 something3)) 'value)
=> {:something2 {:something3 value}}
(get-in *1 (map keyword '(something2 something3)))
=> value
assoc-infor this:(assoc-in nil [:foo :bar] 1)=>{:foo {:bar 1}}.